Friday, November 16, 2018

Toward a HOWTO : Modifying cb2Bib to enable the use of the Annotation field natively

[I am posting this, even though it is is a month or two old, and not finished, with the intention of finishing it soon.  A new version of Cb2Bib was recently released.  It is still possible to use a patch to incorporate these modifictions.  AED] 

This Micro-HOWTO describes a method for modifying the source code of Cb3Bib, to make it possible to easily generate annotations and print PDFs of the database with comments or, if you like, annotations.  This is the one thing I have wanted most from Cb2Bib, Pere Constans's amazing reference database program.  More information, and the program itself, can be found on the website.  Most GNU/Linux distribution provides a package for Cb2Bib.

The instructions I am providing are rudimentary.  For now I will provide a patch for Cb2bib's source code, and a revised *bst for LaTeX's BibTeX component.  This is not necessarily easy, but it works.  At some point, I hope to present more thorough instructions.  I will not be able, unfortunately, to provide assistance in setting this up; I have barely been able to get it running myself.

Here's the workflow for literature searches, to generate a reference list for the libraries.
  1. Search for the references using Google Scholar
  2. Start up cb2bib (it's easier, but not essential, to do it before saving a citation.
  3. Having previously set up Google Scholar to produce bibliographic citations in the BibTeX format 
  4. Click on the Bibtex link underneath a useful item in the research results.
  5. With cb2Bib running, the GUI text input widgets may fill in, if you are fairly luck.
  6. If the Author, Title, Etc, text widgets are populated, select a *.bib database file, and save (click on the icon with a Floppy Dist).  Don't worry: this is not a complicated file; it can be edited using a text editor.  Emacs's Bibtex Mode is awesome for this.
  7. Open a new window (I think this is an editor window) by clicking on the icon with a pencil on it, to the far right at the bottom.
  8. Go to this new window frame, open "Files" and select "Postprocess and show ..", proceed.
  9. A pdf will be displayed.  For me it is displayed either by Evince ("DocumentViewer") or Okular.  Whatever is the default.
This workflow is streamlined and easy.

Perhaps even MORE magical is the way Cb2Bib handles a selections from any source, in guiding the generation of a record for the database.  I will not discuss this.  I should mention that Pere Constans has spent a considerable amount of time developing an "Annote" capacity; I have not gotten my head around it, however useful it may be for others.

What is missing for me is a means to type in a comment or annotation, and the automatic inclusion of this comment in the printed PDF.  A trivial benefit would be to present the Call Number of a book. An annotated bibliography is the obvious target for this kind of work flow.

Pere has done a great service to me, in providing instructions how to modify the code to obtain this result. Now, on page 2 of the input screens is found a space to type an "Annotation", where "Annote" used to be.  Through modification of a BibTeX .bst file, to print the Annotation field.

First, the source code must be patched.  I have had to keep my eye out for some minor glitches that may come up during the implementation of the revised program.  I found it necessary to delete all files left behind by a previous copy of Cb2Bib, including files in the ~/.config directory under MOLSpaces.


Patching cb2bib source code



  

Thoughts about Manjaro, Endeavour, and Gentoo: Recent Dives into the rabbit holes

I have tried Endeavour Linux in the past; something always feels wrong about it.  It has some good points, though.  When I saw it overtook M...