Next: , Up: thebibliography   [Contents][Index]


8.24.1 \bibitem

Synopsis:

\bibitem{cite_key}

or

\bibitem[label]{cite_key}

Generate an entry labeled by label. The default is for LaTeX to generates a number using the enumi counter. The citation key cite_key is a string of letters, numbers, and punctuation symbols (but not comma).

See thebibliography for an example.

The optional label changes the default label from an integer to the given string. With this

\begin{thebibliography}
\bibitem[Lamport 1993]{latexdps} 
  Leslie Lamport. 
  \textit{\LaTeX{}: a document preparation system}. 
  Addison-Wesley, Reading, Massachusetts, 1993.
\bibitem{texbook} 
  Donald Ervin Knuth. 
  \textit{The \TeX book}. 
  Addison-Wesley, Reading, Massachusetts, 1983.
\end{thebibliography}

the first entry will be styled as ‘[Lamport 1993] Leslie ...’ (The amount of horizontal space that LaTeX leaves for the label depends on the widest-label argument of the thebibliography environment; see thebibliography.) Similarly, ... based on \cite{latexdps} will produce ‘... based on [Lamport 1994]’.

If you mix \bibitem entries having a label with those that do not then LaTeX will number the unlabelled ones sequentially. In the example above the texbook entry will appear as ‘[1] Donald ...’, despite that it is the second entry.

If you use the same cite_key twice then you get ‘LaTeX Warning: There were multiply-defined labels’.

Under the hood, LaTeX remembers the cite_key and label information because \bibitem writes it to the auxiliary file filename.aux. For instance, the above example causes \bibcite{latexdps}{Lamport, 1993} and \bibcite{texbook}{1} to appear in that file. The .aux file is read by the \begin{document} command and then the information is available for \cite commands. This explains why you need to run LaTeX twice to resolve references: once to write it out and once to read it in.

Because of this two-pass algorithm, when you add a \bibitem or change its cite_key you may get ‘LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right’. Fix it by recompiling.


Unofficial LaTeX2e reference manual