A Workflow for Using Plaintext Notes with JabRef

JabRef is a reference manager

A reference manager keeps track of citations, documents, and annotations, facilitating academic writing.
much like Zotero and Mendeley. Like Zotero and Mendeley, it is free to use and works across platforms. Like Zotero, it is open source. I’ve been exploring JabRef recently because it integrates with Docear and because it uses a single text file (a BibTeX file) as its “database,” making it easier than Zotero and Mendeley to version control and sync using self-hosted solutions.
Mendeley and Zotero both offer the ability to sync citations to ther servers, but don’t allow (or in the case of Zotero, don’t easily allow) syncing without exposing one’s entire library to others.
While Mendeley and Zotero both allow automatic exporting and manual importing of BibTeX files, and Zotero’s AutoZotBib and Better Bib(La)TeX plugins add better BibTeX functionality, neither offers easy bidirectional syncing with a BibTeX file.

The creators of Docear, which I’ve also been exploring, created a very readable comparison chart of Docear, Zotero, and Mendeley.

I’m currently using a combination of all three programs for reference management. Mendeley is the most advanced of the three in its ability to organize and rename files (similar to a music manager renaming and organizing media files). Zotero’s integration with web browsers is unmatched. Zotero and Mendeley also both use the Citation Style Language (CSL) language for formatting bibliographies and citations, which has a wide community and thus makes both programs useful for exporting in a wide variety of formats (e.g., APA, MLA, etc.). JabRef allows easiest customization of BibTeX keys, and, as mentioned above, allows self-hosted syncing. My current workflow is like this:

This workflow follows the thoughts of researchers here and here.

  1. Import a citation or document via web browser into Zotero, which is set not to save a local copy of imported documents. This facilitates automatic metadata collection.
  2. Use Zotero’s Quick-Copy function (by default, activated with Ctrl+Shift+C) to copy the BibTeX text for the citation.
  3. Paste that BibTeX text into a new entry in JabRef.

Although this does offer advantages over using just Zotero or Mendeley, it does does involve an extra step. I’m not sure how I’ll change it in the future.

Creating custom export filters

JabRef allows users to define “Export Filters.” Similar to CSL files mentioned above, export filters in JabRef are templates for exporting information about citations. I’ve created two Export Filters to facilitate use with my Markdown Mapper script, following the JabRef documention (see esp. the section titled “The WrapFileLinks formatter”) and a collection of template files written by Mark Schenk (cf. here; also noteworthy is R. Almond’s “APAish” export filter for APA-style exports from JabRef.

Closely following the JabRef documentation, this export filter creates a list of all plain-text files associated with the selected citation(s). This list of files could then be passed to Markdown Mapper for concept mapping.

\begin{file}\format[WrapFileLinks(\p\n,,text file)]{\file}\end{file}

In addition, to create a Markdown notes file with YAML metadata about the selected citation(s) filled in, this export filter can be used:

---
\begin{title}Title: \format{\title}\end{title}
\begin{bibtexkey}Bibtex Key: \format{\bibtexkey}\end{bibtexkey}
\begin{author}Author: \format[Authors(LastFirst,FirstInitial,FullPunc,Comma,Oxford,inf,Sep=\nAuthor: ,LastSep=\nAuthor: )]{\author}\end{author}

\begin{journal}Journal: \format{\journal}\end{journal}
\begin{volume}Volume: \format{\volume}\end{volume}
\begin{issue }Issue Number: \format{\number}\end{issue }
\begin{pages}Pages: \format[FormatPagesForHTML]{\pages}\end{pages}
\begin{year}Year: \format{\year}\end{year}
\begin{doi}DOI: \format[DOICheck]{\doi}\end{doi}

\begin{\file}\format[WrapFileLinks(File: "\p"\n)]{\file}\end{\file}

Project: 
Date of Notetaking: 
---

Notes go here.

In both templates, \begin{}...\end{} make a section optional, meaning that JabRef will only include the sections for which it has metadata. Using this second template, this citation (from PLoS Biology)…

Wilson, G., Aruliah, D. A., Brown, C. T., Chue Hong, N. P., Davis, M., Guy, R. T., Haddock, S. H. D., Huff, K. D., Mitchell, I. M., Plumbley, M. D., Waugh, B., White, E. P. and Wilson, P. (2014). Best Practices for Scientific Computing. PLoS Biol, 12(1) pp. e1001745. doi: http://dx.doi.org/10.1371/journal.pbio.1001745.

…would become this text file:

---
Title: Best Practices for Scientific Computing
Bibtex Key: Wilson2014
Author: Wilson, G.
Author: Aruliah, D.
Author: Brown, C.
Author: Chue Hong, N.
Author: Davis, M.
Author: Guy, R.
Author: Haddock, S.
Author: Huff, K.
Author: Mitchell, I.
Author: Plumbley, M.
Author: Waugh, B.
Author: White, E.
Author: Wilson, P.

Journal: PLoS Biol
Volume: 12

Pages: e1001745
Year: 2014
DOI: http://dx.doi.org/10.1371/journal.pbio.1001745

Project: 
Date of Notetaking: 
---

Notes go here.


Installing custom export filters

As usefully summarized by the author of the APAish JabRef layout, these export filters can be installed with just a few steps:

  1. Save each filter to its own plaintext file, with .layout as the file extension (e.g., name the file Notes.layout).
  2. In JabRef, click Options -> Manage Custom Exports.
  3. Select “Add new.”
    • “Export Name” is the name that JabRef will display in its menus for the filter.
    • “Main layout file” should be the filepath to the .layout file you just saved.
    • “File extension” is the type of file you would like JabRef to save when using the filter (e.g., ‘.txt’).

To use the filter, either right-click a citation, choose “Export to clipboard,” and then choose the export filter you added above; or select a citation, select File -> Export Selected Entries, choose the filter from the “Filter:” dropdown menu, and choose where you’d like to save the output file.

Related

Next
Previous