Date: | 2009-06-26 |
---|---|
tags: | LaTeX |
category: | Miscellaneous |
When using bibliographies (Litteratur in Danish) in LaTeX, it includes its own header – which is not added to the table of contents. My usual trick have been this line of code:
\addcontentsline{toc}{section}{Litteratur}
While it did add "Litteratur" to the TOC, it didn’t have a number – it just kind of hung around. So. Upon looking for a decent solution, I found the WikiBooks LaTeX book. It suggests the following:
\clearpage
\section{Bibliography}
\renewcommand*{\refname}{}
\begin{thebibliography}{99}
...
\end{thebibliography}
Slightly adapted to use an included .bib-file, it thusly become:
\clearpage
\section{Litteratur}
\renewcommand*{\refname}{}
\bibliography{bibliografi}{}
\bibliographystyle{plain}
See WikiBooks’ LaTeX Tips and Tricks for the details.
After switching from article to report, the hack above stopped working. A new solution was called for.
Searching my local TeX–installation for hits, I discovered tocibind:
\usepackage[numbib,notlof,notlot,nottoc]{tocbibind}
The numbib ensures the bibliography gets numbered. The not*'s makes sure the lists of figures, tables and table of contents itself don’t get listed.