Tags:
bibliography1Add my vote for this tag create new tag
view all tags

EmbedBibPlugin

Embed BibTeX entries in a TWiki page

Overview

This is a plugin that you can use to embed BibTeX entries in TWiki webs. It uses BibTool and Bibtex2html

Syntax Rules

  • %EMBEDBIB{webname="string" topic="string" style="string" bibfile="string" sort="string" select1="string (string)" select2=...}%
    • EMBEDBIB uses the BibTeX file defined in bibfile
    • The bibfile must be attached in topic in webname web
    • style can be HTML formatted text (html) or raw text (bibtext)
    • webname, topic, and style can be omitted. The plugin will use the preferences variables defined in EmbedBibPlugin Global Settings
    • If the style is html, sort can be used to sort the entries by year or by name. If the style is bibtex, sort is ignored
    • select1, select2, select3, and select4 are used to select the BibTeX entries. select1 is mandatory while the others are optional.
    • The format of selects is: selectx="field_name (search_string)". Examples of field_name are author and year (more examples can be found in BibTool manual). Examples of search_strings are Einstein and 2003.
    • Multiple selects are used to provide the AND operation, e.g. %EMBEDBIB{... select1="author (Einstein)" select2="year (2003)"}% will find entries authored by Einstein AND authored in the year 2003.
    • For OR operation, use | in the seach_string, e.g. %EMBEDBIB{... select1="author (Einstein|Fermi)"|% will find entries authored by Einstein or Fermi.

Examples

  • %EMBEDBIB{webname="Sandbox" topic="BibTest" style="html" bibfile="cite.bib" select1="author (Einstein)"}%
    • Use cite.bib which is attached in Sandbox under the topic BibTest as the BibTeX file
    • Embeds all of the references from the BibTeX file which have Einstein in the author field
    • Format the embedded text as html

  • %EMBEDBIB{bibfile="cite.bib" select1="author (Einstein|Fermi)" select2="year (2003)"}
    • Use cite.bib which is attached to the DEFAULTWEBNAME under the topic DEFAULTTOPICNAME as the BibTeX file
    • Embeds all of the references from the BibTeX file which have Einstein or Fermi in the author field and 2003 in the year field
    • Format the embedded text as DEFAULTSTYLE

EmbedBibPlugin Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %EMBEDBIBPLUGIN_SHORTDESCRIPTION%

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Embed BibTeX entries in a TWiki page

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

  • Default web name for BibTeX files:
    • Set DEFAULTWEBNAME = TWiki

  • Default topic name for BibTeX files:

  • Default style (bibtex or html):
    • Set DEFAULTSTYLE = bibtex

  • Default sorting method (year or name):
    • Set DEFAULTSORT = year

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the adminis trator who installs the plugin on the TWiki server.

  • You need to install BibTool and Bibtex2html on the server. The commands bibtool and bibtex2html must be in the path of the process that runs the TWiki scripts. If they are not in the path, change $bibtoolPath and $bibtex2htmlPath in lib/TWiki/Plugins/EmbedBibPlugin.pm to point to the correct location.

  • For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.

  • Or, follow these manual installation steps:
    • Download the ZIP file from the Plugins home (see below).
    • Unzip EmbedBibPlugin.zip in your twiki installation directory. Content:
      File: Description:
      data/TWiki/EmbedBibPlugin.txt Plugin topic
      lib/TWiki/Plugins/EmbedBibPlugin.pm Plugin Perl module
      pub/TWiki/EmbedBibPlugin/sample.bib Plugin sample BibTeX file
    • Set the ownership of the extracted directories and files to the webserver user.

  • Plugin configuration and testing:
    • Run the configure script and enable the plugin in the Plugins section.
    • Test if the installation was successful:
      • A list of BibTeX entries:

%EMBEDBIB{bibfile="sample.bib" select1="author (Moresi)"}%

Plugin Info

Plugin Author: TWiki:Main.DonnyKurniawan
Copyright: © 2003 TWiki:Main.DonnyKurniawan
© 2008-2011 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 2011-03-12
Change History:  
2011-03-12: TWikibug:Item6638: Fix code for TWiki-4.0 and up; doc fixes; changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
2003-09-24: Initial version
CPAN Dependencies: none
Other Dependencies: BibTool and Bibtex2html
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/EmbedBibPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/EmbedBibPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/EmbedBibPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 EmbedBibPlugin.md5 r3 r2 r1 manage 0.2 K 2011-03-12 - 08:59 PeterThoeny  
Compressed Zip archivetgz EmbedBibPlugin.tgz r3 r2 r1 manage 6.6 K 2011-03-12 - 08:59 PeterThoeny  
Compressed Zip archivezip EmbedBibPlugin.zip r4 r3 r2 r1 manage 8.6 K 2011-03-12 - 08:59 PeterThoeny  
Unknown file formatext EmbedBibPlugin_installer r3 r2 r1 manage 3.4 K 2011-03-12 - 08:59 PeterThoeny  
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2018-07-17 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.