<<O>>  Difference Topic EmbedBibPlugin (r1.2 - 27 Aug 2003 - DonnyKurniawan?)
Changed:
<
<
BibTeXPlugin?
>
>

EmbedBibPlugin


Changed:
<
<
Under Construction
>
>
This is a plugin that you can use to embed BibTeX entries in TWiki webs. It uses BibTool and Bibtex2html

Added:
>
>

Syntax Rules


Added:
>
>
  • %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.

Added:
>
>

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

Added:
>
>
  • %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

Changed:
<
<
<!--
    • Set SHORTDESCRIPTION = This plugin does nothing.
-->
>
>

EmbedBibPlugin Global Settings


Changed:
<
<
-- DonnyKurniawan? - 27 Aug 2003
>
>
Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %EMBEDQTPLUGIN_SHORTDESCRIPTION%

Changed:
<
<
META FILEATTACHMENT sample.bib attr="" comment="Sample of a bib file" date="1061957315" path="sample.bib" size="1712" user="DonnyKurniawan" version="1.1"
>
>
  • 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

  • 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 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:

@Article{ wein.more.ea:pr.2003, author = {Weinberg, R. F. and Moresi, L. and van der Borgh, P.}, category = {C1}, journal = {Precambrian Res}, pages = {219-239}, title = {Timing of deformation in the Norseman-Wiluna Belt, Yilgarn Craton, Western Australia}, volume = {120 (3-4)}, year = {2003} }

@Article{ solo:more:jgr.2002, author = {Solomatov, V. S. and Moresi, L. N.}, category = {C1}, journal = {J. Geoph. Res.}, pages = {Art no 2016}, title = {Small-scale convection in the D '' layer }, volume = {107}, year = {2002} }

@Article{ vezo.solo.ea:jgr.2003, author = {Vezolainen A.V. and Solomatov, V. S. and Head J.W. and Basilevsky, A. T. and Moresi, L. N. }, category = {C1}, journal = {J. Geoph. Res.}, pages = {Art no 5002}, title = {Timing of formation of Beta Regio and its geodynamical implications }, volume = {108}, year = {2003} }

Plugin Info

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

META FILEATTACHMENT sample.bib attr="h" comment="A sample bib file" date="1064371674" path="sample.bib" size="1712" user="DonnyKurniawan" version="1.1"
 <<O>>  Difference Topic EmbedBibPlugin (r1.1 - 27 Aug 2003 - DonnyKurniawan?)
Line: 1 to 1
Added:
>
>
BibTeXPlugin?

Under Construction

<!--

    • Set SHORTDESCRIPTION = This plugin does nothing.
-->

-- DonnyKurniawan? - 27 Aug 2003

META FILEATTACHMENT sample.bib attr="" comment="Sample of a bib file" date="1061957315" path="sample.bib" size="1712" user="DonnyKurniawan" version="1.1"
Revision r1.1 - 27 Aug 2003 - 04:15 - DonnyKurniawan?
Revision r1.2 - 27 Aug 2003 - 06:24 - DonnyKurniawan?