Day 7 - Bibliographies and Footnotes

video

Bibliographies

Today we are going to focus on citations, and the modern tools for managing them.

If this gives you awful memories of high school English classes requiring you to write precise Chicago, MLA, or APA citations... congratulations! Basically nobody actually does that in the mathematical world.

Instead, we use citation managers like bib$\TeX$ and its successor bib$\LaTeX$. (The AMS has also published one, amsrefs, but it has not seen as wide-spread support or adoption.)

Building your Bibliography

If you wish to know the workings, including how to write references from scratch, documentation and full tutorials exist. Fortunately, we often don't actually need to learn any of that - publishers and journals, such as JSTOR, have taken to providing it - and even more helpfully, Google scholar and MathSciNet will create bib$\TeX$ data for you. I would recommend never - or as close to it as you can manage - writing your own bibliography file. You don't need to, and it is a recipe for typos and errors.

For example, here is Google Scholar's export for the 2011 Art of Computer Programming Box Set:

@book{knuth2011art,
  title={Art of Computer Programming, Volumes 1-4A Boxed Set},
  author={Knuth, Donald E},
  year={2011},
  publisher={Addison-Wesley Professional}
}

Bibliography Files

You might notice that you can't just put this in your $\LaTeX$ file. It is its own, separate but related language - and must be stored in its own separate file.

Professional researchers often find themselves citing many of the same documents. Bib$\TeX$ allows you to manage these citations in a small number of .bib files - many people keep just one - and automatically build citation lists with just the references you have used in your paper. This helps reduce copy-pasting redundant data, and simplifies the writing of new documents.

As with most files in $\LaTeX$, it first searches in the local directory - or you can give it a relative filepath from your .tex file. However, this isn't great if you want to move your document or reuse bibliographies in different documents.

Just like with beamer styles, we are going to add our bibliography to our local latex configuration.

Go to your texmf directory - in windows MikTeX 2.9, ~/AppData/Roaming/MikTeX/2.9/ - and create a folder bibtex and, within that folder, bib.

In bash, you can create both at once with:

mkdir -p ~/AppData/Roaming/MikTeX/2.9/bibtex/bib

This folder will now be searched for bibliographies, so let's put a file there. Call it default.bib and open it in atom: you can do both from bash with:

atom ~/AppData/Roaming/MikTeX/2.9/bibtex/bib/default.bib

Then - as with every time you add or delete files in your texmf directories - you should run the command:

texhash

to tell $\LaTeX$ that you made a change.

Using Bibliography Files

Now that $\LaTeX$ can find our bibliography file, we can use it to make citations. To do that, we use the biblatex package, load default.bib with the command \bibliography{default} in the header, and use the \cite command with the identifier in our biblography file:

\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,physics}
\usepackage{biblatex}
\bibliography{default}
\begin{document}
Citing Knuth's Book \cite{knuth2011art}

\printbibliography
\end{document}

The last thing to do is print the compiled bibliography with \printbibliography.

BibTeX is capable of producing a wide range of citation styles, and you should follow the guidelines of wherever you are submitting. Here is a list of biblatex commands - far more than you will ever need.

Finishing

Move on to today's worksheet to practice using Bib$\TeX$, then when you are ready move on to tomorrow's material.

Department of Mathematics, Purdue University
150 N. University Street, West Lafayette, IN 47907-2067
Phone: (765) 494-1901 - FAX: (765) 494-0548
Contact the Webmaster for technical and content concerns about this webpage.
Copyright© 2018, Purdue University, all rights reserved.
West Lafayette, IN 47907 USA, 765-494-4600
An equal access/equal opportunity university
Accessibility issues? Contact the Web Editor (webeditor@math.purdue.edu).