Skip to content

Instantly share code, notes, and snippets.

@msiebuhr
Created April 8, 2013 11:40
Show Gist options
  • Save msiebuhr/5336210 to your computer and use it in GitHub Desktop.
Save msiebuhr/5336210 to your computer and use it in GitHub Desktop.
Worthwhile stuff from my old blog

LaTeX and bibliography headings

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.

Update 07/2009

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment