Difference between revisions of "Automating BibTeX"
m (Text replace - '<pre>' to ' <pre>') |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
The downside (Ah! There always is one!!) is one has to spend countless hours preparing the list of BibTeX entries (called the ''BibTeX database'') in a format like:<nowiki> | The downside (Ah! There always is one!!) is one has to spend countless hours preparing the list of BibTeX entries (called the ''BibTeX database'') in a format like:<nowiki> | ||
</nowiki><pre><nowiki> | </nowiki> | ||
<pre><nowiki> | |||
@ARTICLE{Dawkins05, | @ARTICLE{Dawkins05, | ||
author = {Dawkins, R.}, | author = {Dawkins, R.}, | ||
Line 21: | Line 22: | ||
[[Image:search-ingenta.png|thumb|IngentaConnet(TM) Search]] | [[Image:search-ingenta.png|thumb|IngentaConnet(TM) Search]] | ||
[[Image:search-ingenta2.png|thumb|Copying the Link]] | [[Image:search-ingenta2.png|thumb|Copying the Link]] | ||
* First download the file [[:Image:Ingenta2BibTeX.tar.gz|Ingenta2BibTeX.tar.gz]] and unpack the contents and move the resulting files to somewhere in your <tt>$PATH</tt>: | |||
<pre><nowiki> | |||
tar -xzvf Ingenta2BibTeX.tar.gz | tar -xzvf Ingenta2BibTeX.tar.gz | ||
mv ingentabids2bibtex.bash isi2bibtex /usr/local/bin | mv ingentabids2bibtex.bash isi2bibtex /usr/local/bin | ||
</nowiki></pre> | |||
* or anywhere else in your path | |||
<pre><nowiki> | |||
chmod u+x /usr/local/bin/ingentabids2bibtex.bash \ | chmod u+x /usr/local/bin/ingentabids2bibtex.bash \ | ||
/usr/local/bin/isi2bibtex | /usr/local/bin/isi2bibtex | ||
</nowiki></pre> | </nowiki></pre> | ||
* Now access the [http://www.ingentaconnect.com IngentaConnect] website. Use the [http://www.ingentaconnect.com/search search page]] to get a set of articles that you need to add to your BibTeX database. In the results page, copy the link 'export (plain text)' to the clipboard. It will be a long url like this: | |||
<pre><nowiki> | |||
http://www.ingentaconnect.com/search?volume=& | http://www.ingentaconnect.com/search?volume=& | ||
journal_type=words&title=&year_from=2001& | journal_type=words&title=&year_from=2001& | ||
Line 37: | Line 43: | ||
database=0&x=44&format=download | database=0&x=44&format=download | ||
</nowiki></pre> | </nowiki></pre> | ||
* Then at your [[wikipedia:Bash|Bash]] prompt run the program ingentabids2bibtex.bash with the above (surrounded with quotes) as argument.: | |||
<pre><nowiki> | |||
$ ingentabids2bibtex.bash '<the url above>' | $ ingentabids2bibtex.bash '<the url above>' | ||
</nowiki></pre>. | </nowiki></pre>. | ||
* For example: | * For example: | ||
<pre><nowiki> | |||
ingentabids2bibtex.bash \ | ingentabids2bibtex.bash \ | ||
'http://www.ingentaconnect.com/search?volume=&title=multifractal&journal_type | 'http://www.ingentaconnect.com/search?volume=&title=multifractal&journal_type | ||
Line 49: | Line 57: | ||
pageSize=20&author=pathirana%2c+A.&database=0&x=29&format=download' | pageSize=20&author=pathirana%2c+A.&database=0&x=29&format=download' | ||
</nowiki></pre> would result<nowiki> | </nowiki></pre> would result<nowiki> | ||
</nowiki><pre><nowiki> | </nowiki> | ||
<pre><nowiki> | |||
@ARTICLE{Pathirana03, | @ARTICLE{Pathirana03, | ||
author = {Pathirana, A. and Herath, S. and Yamada, T.}, | author = {Pathirana, A. and Herath, S. and Yamada, T.}, |
Latest revision as of 19:08, 2 October 2009
The Problem
LaTeX is a very versatile tool which help one regularly writing articles to scientific journals, to save a huge amount of time. On of the important tool in this application is the management of bibliography. Hardworking people first write the manuscript and then write the references on by one. Lazy ones (e.g. myself) use a specialized tool to automatically generate the list. BibTeX(LNK) is such a tool that works with LaTeX. It can produce beautiful error free list of bibliography formatted to the exact specifications of the targeted publication.
The downside (Ah! There always is one!!) is one has to spend countless hours preparing the list of BibTeX entries (called the BibTeX database) in a format like:
@ARTICLE{Dawkins05, author = {Dawkins, R.}, title = {UNINTELLIGENT DESIGN - How could these medicore theorists be allowed to expose a great science power to worldwide ridicule?}, journal = {Newsweek}, year = {2005}, volume = {15-DEC-2005}, number = {SPI}, pages = {88-89} }
which is not exactly the most convieniant task to perform.
The Solution
(You must be using either the CygWin system on windows or one of the UNIX variants like Linux to make use of this solution. If this sounds foreign, first read this article and this.)
- First download the file Ingenta2BibTeX.tar.gz and unpack the contents and move the resulting files to somewhere in your $PATH:
tar -xzvf Ingenta2BibTeX.tar.gz mv ingentabids2bibtex.bash isi2bibtex /usr/local/bin
- or anywhere else in your path
chmod u+x /usr/local/bin/ingentabids2bibtex.bash \ /usr/local/bin/isi2bibtex
- Now access the IngentaConnect website. Use the search page] to get a set of articles that you need to add to your BibTeX database. In the results page, copy the link 'export (plain text)' to the clipboard. It will be a long url like this:
http://www.ingentaconnect.com/search?volume=& journal_type=words&title=&year_from=2001& title_type=tka&issue=&year_to=2006&journal=Newsweek& y=13&pageSize=20&author=Dawkins%2c+R.+& database=0&x=44&format=download
- Then at your Bash prompt run the program ingentabids2bibtex.bash with the above (surrounded with quotes) as argument.:
$ ingentabids2bibtex.bash '<the url above>'
.
- For example:
ingentabids2bibtex.bash \ 'http://www.ingentaconnect.com/search?volume=&title=multifractal&journal_type =words&year_from=2001&title_type=tka&issue=&year_to=2006&journal=&y=8& pageSize=20&author=pathirana%2c+A.&database=0&x=29&format=download'
would result
@ARTICLE{Pathirana03, author = {Pathirana, A. and Herath, S. and Yamada, T.}, title = {Eslimating rainfall distributions at high temporal resolutions using a multifractal model}, journal = {Hydrology and Earth System Sci.}, year = {2003}, volume = {7}, number = {5}, pages = {668-679} } @ARTICLE{Pathirana02, author = {Pathirana, A. and Herath, S.}, title = {Multifractal modelling and simulation of rain fields exhibiting spatial heterogeneity}, journal = {Hydrology and Earth System Sci.}, year = {2002}, volume = {6}, number = {4}, pages = {695-708} }
You might have to change the keys (Pathirana03, Pathirana02) so that it will not conflict with others already existing in your BibTeX; but there's no question that this is way easier than writing these weird things by hand.
Acknowledgments
- The Perl script isi2bibtex : Copyright (C) 2000 Jonathan Swinton, Ben Bolker, Anthony Stone, John J. Lee, under GNU GPL.
- IngentaConnect is property of Ingenta Plc., USA.