Wednesday, March 8, 2017

Directly accessing PDFs from BibSonomy in TeXlipse

When writing some article in LaTeX you use a statement like this \cite{becker2016sparktrails} to cite your references. Yet, especially when putting together your related work, you need to have a look at the article again. Dependent on how you manage your references, this includes a more or less cumbersome search for the the publication and the PDF associated with the corresponding Bib-Key (becker2016sparktrails).

Now, in case you are managing your publications and references with BibSonomy diligently uploading your PDFs (e.g., using the Chrome plug-in BibSonomy Scholar) in combination with the LaTeX editor TeXlipse, we came up with a little shortcut:

Mark the Bib-Tex Key, hit F9 (or any shortcut), and the PDF will open in your favorite PDF viewer.

To achieve this, we use a Python 3 script to download our references and take advantage of the External Tool configuration and corresponding shortcuts provided by Eclipse. This is a little hacky, but it works nicely in most cases. With a little more programming, this approach can probably be integrated more tightly and even work with other editors as well (such as TeXstudio or TeXmaker).

For details, please see this blog entry by Martin Becker.

Friday, February 10, 2017

BibSonomy + BibLaTeX: A powerful combination

Researchers often have to deal with citing someone else’s work in my publications. The probably most widely used combination for writing papers with references is pdflatex + bibtex. While those two programs work pretty well, they don’t have too many features. Furthermore, while maintaining a bibliography became a lot easier with BibSonomy, it still is a tedious task to extract the right references for each new paper by hand and save them into a bibtex file in the corresponding project. This leads to cluttered references across several publications, as any changes in one's BibSonomy collection are not retrospectively applied to the .bib-files of older publications. While there is a BibSonomy plugin for TeXlipse, it is not actively maintained today while having a few issues, such as not automatically refreshing or synchronizing the local bibliography with BibSonomy or placing the downloaded keys into a file with fixed location and name.
BibLaTeX is an extension for BibTeX, which provides some nice functionality. It is e.g. now possible to just add the following two lines to the LaTeX project header to not having to bother with ever-different keys and inconsistent bibliographies:
\usepackage[backend=biber]{biblatex}
\addbibresource[location=remote]
    {http://www.bibsonomy.org/bib/user/thoni/myown}
Later on,  the bibliography can be printed by just typing
\printbibliography
Now every time the PDF file is compiled, the list of publications in BibSonomy with the tag "myown" from the user "thoni" will be downloaded. This is especially useful when adding new papers to the BibSonomy collection while working at the "Related Work" section or similar.

While this is only a very basic example of how BibLaTeX and BibSonomy integration could work, there are many possibilities to extend this, e.g. by further restricting the \printbibliography command with tag selection or printing the bibliography several times from just one source. A more exhaustive introduction to BibLaTeX can be found at the corresponding ShareLaTeX page.

Happy tagging (and easier writing ;) )
Thomas

Popular Posts