# Managing References with LaTeX/BibTeX

This LibGuide is designed for University of Melbourne staff and students to instruct on the various methods of reference management within LaTeX documents. The basics of a LaTeX bibliography is explained with reference to more popular editors such as Shar

## What is LaTeX?

LaTeX is a typesetting markup language that is used to create formatted documents.

• You create a plain text file, with the extension.tex, and mark the text up with commands that are processed to create a formatted document.
• It is widely used by scientists, engineers and other academics because it makes it easy to typeset complex mathematical formulae.

## What is BibTeX?

You can use BibTeX to automatically generate & format a bibliography in a LaTeX document.

First you need to create a bibliography database file with the extension .bib containing bibliographic entries.

You can then use the following commands in your LaTeX document:

• \cite{label}
• To insert a citation where label is the label of a bibliographic entry in a .bib file.
• \bibliography{bibfilename}
• To insert a bibliography where bibfilename is the name of a .bib file.
• \bibliographystyle{bstfilename}
• To choose a BibTeX bibliographic style file with the extension .bst.

## LaTeX & BibTeX Example

This is an example of a .bib file called BibFile.bib that has just one bibliographic entry for a book:

@Book{gG07,
author = "Gratzer, George A.",
title = "More Math Into LaTeX",
publisher = "Birkhauser",
year = 2007,
edition = "4th"
}



This is an example of a .tex file that refers to the .bib file:

\documentclass[12pt]{article}

\usepackage{amsmath}

\title{An Example Document}

\author{John Smith}

\date{}

\begin{document}

\maketitle

\section{The first section}

This is an example of a document formatted using \LaTeX{}.
This is an example of a citation \cite{gG07}.
Now here is an example of an equation:

\begin{align}
i\hbar\frac{\partial}{\partial t}\Psi(r,t) = -\frac{\hbar^2}{2m}\nabla^2\Psi(r,t)+V(r)\Psi(r,t)
\end{align}

\bibliographystyle{amsplain}

\bibliography{BibFile}

\end{document}

And a screenshot of a section of the resulting typeset output: