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:
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", address = "Boston", 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: