Skip to topic | Skip to bottom
... Mobius IST-15905


Start of topic | Skip to actions

Embed Bib Plugin

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

Syntax Rules

  • %EMBEDBIB{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 (be in the twiki pub directory) and have the path topic
    • style can be HTML formatted text (html) or raw text (bibtext)
    • 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. The parameter can take the following values: "by-date", "as-bibtex", "unsorted", "reverse" or a combination of them separated by a space, for instance "by-date reverse". 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="filter_condition". Examples of filter_condition is "author : \"Barthe\" and year >= 2003" (more examples can be found in bib2bib manual).

Examples

  • %EMBEDBIB{webname="Sandbox" style="html" bibfile="Sandbox/cite.bib" select1="author : \"Einstein\""}%
    • Use Sandbox/cite.bib 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="Publications/cite.bib" select1="author : \"Einstein\" or author : \"Fermi\"" select2="year = 2003"}
    • Use Publications/cite.bib 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, %EMBEDQTPLUGIN_SHORTDESCRIPTION%

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Embeds 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
    • Set DEFAULTOUTPUTFILE = publis.bib
    • Set TABOOFILE = Bib Files?

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

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

Plugin Installation Instructions

Note: 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. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip EmbedBibPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/EmbedBibPlugin.txt Plugin topic
    data/TWiki/EmbedBibPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/EmbedBibPlugin.pm Plugin Perl module
    pub/TWiki/EmbedBibPlugin/sample.bib Plugin sample BibTeX file
    pub/TWiki/EmbedBibPlugin/sample.bib,v Plugin sample BibTeX file repository
  • Test if the plugin is correctly installed:
    • A list of BibTeX entries:

[flops06] Masimi Hagiya and Philip Wadler, editors. Proceedings of FLOPS'06, Lecture Notes in Computer Science. Springer-Verlag, 2006. to appear.
[ bib ]

[BFPR06:flops] G. Barthe, J. Forest, D. Pichardie, and V. Rusu. Defining and reasoning about recursive functions: a practical tool for the Coq proof assistant. In Hagiya and Wadler [flops06]. to appear.
[ bib ]


This file has been generated by bibtex2html 1.66

Plugin Info

Plugin Author: TWiki:Main/DonnyKurniawan
Plugin Version: 24 Sep 2003 (V1.000)
Change History:  
24 Sep 2003: 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

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main/DonnyKurniawan - 24 Sep 2003


You are here: TWiki > EmbedBibPlugin

to top

Ideas, requests, problems regarding the Mobius site QUESTION?