Monday, August 7, 2023

bibliography example

I've saved some articles and books, and put the references into a BIB file. I want a works cited (MLA) or references (APA) page at the end of an article I'm writing. What are the basics

The TEX file and the BIB file are joined at the hip and neither will compile if they're not entirely clean of syntactic errors. It's a state of near-continual anxiety.

1. the TEX file

# pacman -S texlive-bibtexextra

In the TEX heading...

\usepackage[style=mla,backend=bibtex]{biblatex}
\addbibresource{foo.bib}

In the TEX article, whenever we cite something we get the citations key number from the BIB file. In this case, lets say our citation for some article is "z023". Then...

\cite{z023}

At the end of the TEX file, just before "\end{document}"...

\printbibliography

2. The procedure

  1. check the BIB file for underscores and syntax errors. Jabref can sometimes help with this. If there are failures, just come back to this step and clean the BIB file again and again.
  2. ensure the BIB file is locatable in the \addlibresource filepath.
  3. run the TEX a first time, using the build menu "Latex -> PDF" option (pdflatex)
  4. run the TEX a second time, using the build menu "Bibtex" option (creates the BLG)
  5. run the TEX a third time using the "Latex -> PDF" option (pdflatex)

No comments: