Time for action – creating and using a BibTeX database
We shall create a separate database file containing the references of our previous example. We will modify our example to use that database. To make this database usable, we have to call the external program BibTeX :
Create a new document. Begin with writing the entry for the TeXbook:
@book{DK86, author = "D.E. Knuth", title = "The {\TeX}book", publisher = "Addison Wesley", year = 1986 }
For the next entry, that is, the article, we will specify even more fields:
@article{DK89, author = "D.E. Knuth", title = "Typesetting Concrete Mathematics", journal = "TUGboat", volume = 10, number = 1, pages = "31--36", month = apr, year = 1989 }
Save the file and give it the name
tex.bib
. Open our exampletex
document and modify it as follows:\documentclass{article} \begin{document} \section*{Recommended texts} To study \TeX\ in depth, see \cite{DK86}. For writing math texts, see \cite{DK89}. \bibliographystyle{alpha} \bibliography{tex} \end{document}
Typeset...