Thesis tech 2 - BibTeX
Monday, February 18, 2013 at 15:34
martian77 in DPhil, process, thesis

I'm already pretty comfortable with the workflow I outlined in Thesis tech, so the next step was looking at how to reference. LaTeX and BibTeX obviously play well together, but I've been using Mendeley to store all of my references. At this stage I don't really want to swap and use BibTeX, plus the import features on Mendeley are really handy. 

Fortunately for me, Mendeley will actually export to BibTex, creating a different .bib file for each collection in my stash! This handy post on the Mendeley blog told me all I needed to know, sort of. Sadly when I looked the pictures were down, so I couldn't follow step by step. The only small problem is that you can't seem to control which collections are exported. But that's tiny. So I've created a Mendeley collection called "bib" (because that was the name of the file in the template, it's as good as any!). Anything I want to cite will get added to that collection, and the exported bib file gets updated. 

What I'm doing is exporting them to a separate folder, then copying my bib.bib file (heh, silly name) into one happy thesis folder. I figure there is slightly less chance of accidentally overwriting them then. 

The next challenge was how to actually reference them in my LaTeX document. This seems to be slightly more convoluted. Fortunately, this post from CUED (blast from my past!) gave me nice simple instructions. Being on a mac makes running BibTeX as easy as opening up a terminal and typing "bibtex {filename}". 

It has added to the number of lines in my included files that I need to comment in and out if I want to compile a chapter separately. I'm up to 6 lines now:

\documentclass[a4paper,11pt]{report}
\usepackage{natbib}
\bibliographystyle{apalike}
\begin{document}

My text goes here

\bibliography{bib}
\end{document}

That's still not too painful.

I still have tables and figures to sort out, so I'll update as I sort those (however I do that!). For now though, this approach is still working for me.

Article originally appeared on Life on Mars (http://www.martiandaze.net/).
See website for complete article licensing information.