Saturday, August 22, 2015

Get bibliography to work with Markdown, LaTeX and MS Word

I am a fun of Google, Markdown, LaTeX, but I have to work with people who are using MS Word.

1. Work with Markdown

To cut it short, I first download citations from Google Scholar (use the “Import to BibTex” option), save it as text. But I will modify it with Markdown syntax. Particularly, I use * for italics, which is veeeeery handy. Also I will correct some other obvious mistakes in this step.

2. Work with LaTeX

Then I will use customized Perl script to convert this Markdown-Bibtex hybrid text into pure BibTex with formatBibli.pl. This script will take in two argument, the other is journalAbbrev database which is also customized for any kind of journal output, all flexibility can be realized through updating this script.

3. Work with MS Word

The reason why I surrender to MS Word is:
1. Too many of my colleges are using it;
2. The “revision” function is very impressive in Word;
3. The output style in Endnote is really impressive, it saves me a lot of time, this is the killing reason that makes me to do the final touch of citing papers in MS Word with Endnote.

So for now, the whole point is how to convert from *.bib to endnote. As I just learned that only Endnote xml file could fully encapsulate all elements of a citation item and work very well with Endnote. Other formats such as *.txt or *.ris does not, because they just cannot import the italics, bold or other important modification of fonts into Endnote. If they do not do this, you will have to do everything by yourself in Endnote manually, which is very tedious. Luckily, we have bib2endnote by Trent Apted. It can convert *.bib to Endnote xml easily.

4. My workflow

  1. Writing papers in Markdown: when a citation come across, I will just use (citation someRandomInfomation) there;
  2. When the paper is finished, I will get serious about the citations, I will go to find the citations I meant in the first writing. I will then prepare a *.bib file especially for this document following these steps:
    a. find the citated paper in mybiblio file, if exists, copy it to the new bib file;
    b. if does not exists, go to Google Scholar, find it, correct.
    c. Once put an item into the new bib file, I will change the “citation someRandomInfomation” to the “cite citationKey”, which is ready to be recognized by LaTeX.
    d. Keep correcting for this new bib file, until everything looks correct.
    e. Use a “updateBibli.pl” script to update mybiblio, the point of this script is taking all items in the new bibli, and integrate all other items in the old biblio, so that every modification will be integrated into mybibli which will serve as a permanent bank.

  3. Run the formatBibli.pl to convert hybrid format into bib format, if neccessary, I will compile the document into a pdf with LaTeX. If I do not want bibliography to be compiled in PDF and lost the citationKey, I will this substitute “cite” into “citation” in markdown, so it will not be converted.

  4. Convert PDF to Word with Adobe Acrobat.

  5. Some adjustment of page setting with Word.

  6. Convert bib file into Endnote XML file and import it into Endnote.

  7. Citation in Word.

No comments:

Post a Comment