Developer's Diary
Software development, with Terry Ebdon
Using Zotero with Doxygen

Saturday 8th July, 2017

I've shown you how to use citations in Doxygen markdown, let's take it a step further and integrate with Zotero citations.

Export from Zotero

To export a Zotero collection right click on it and select export:

On the export pop-up select BibTeX from the format drop-down, then click OK.

Save as type BibTeX (*.bib) in the same folder as your Doxyfile:

Tell Doxygen about the new BibTeX file

Edit your Doxyfile and locate the CITE_BIB_FILES entry. Add the BibTex file name after the "=" sign:

CITE_BIB_FILES = test.bib "Synthetic Biology"

My Doxyfile references two BibTeX files: test.bib is from yesterday's post, and "Synthetic Biology" is the file exported from Zotero.

Note
  1. If the file name contains spaces then surround the name with double quote characters, as in the example above.
  2. If you don't specify the file type then Doxygen will assume it's .bib; see above.

Cite the exported article in markdown

In the exported BibTeX we can see the citation for the first article is lee_development_2016:

@article{lee_development_2016,
	title = {Development of 3D {Microvascular} {Networks} ...
	issn = {2192-2659},
	url = {http://onlinelibrary.wiley.com/doi/ ...},
	doi = {10.1002/adhm.201500792},
	...
}

Edit the markdown and cite this article:

# Hello World {#mainpage}

Groovy in Action is an excellent book. \cite gina2e

## Synthetic Biology

We use an approach similar to the concise reference phylogeny proposed by Lee et
al. \cite lee_development_2016 with minor modifications

Create output as HTML or latex and PDF

Run the doxygen command, as described yesterday, to create the latex and / or HTML files. If a PDF is required then run the make file that Doxygen created in the latex folder. The citations will appear similar to the ones created yesterday. As the BibTex @article for lee_development_2016 contains a URL the corresponding bibliography entry will be hyperlinked, on the Doxygen generated web page.

Example bibliography

Example PDF bibliography, generated by Doxygen, from the above markdown:


7th July 👈 Top of page 👉 9th July © 2017 Terry Ebdon.

Find me coding on GitHub, networking on LinkedIn, answering questions on Stack Exchange and hanging out on twitter.