How can I tell LaTeX to write additional content to bbl
file?
Background of my question (see also MWE below): The page number for the bibliography displayed in the table of contents is correct if and only if \addcontentsline{toc}{chapter}{Bibliography}
is placed at the beginning of the thebibliography
environment. Hence, using bibTeX
I need to write \addcontentsline{toc}{chapter}{Bibliography}
into the bbl
file. If I place it before \begin{thebibliography}
the page number is first page of bibliography - 1, if I place it after \end{thebibliography}
it is last page of bibliography + 1 (which in the MWE would be correct but not in general).
\documentclass{book}
\begin{document}
\tableofcontents
\begin{thebibliography}{B}
\addcontentsline{toc}{chapter}{Bibliography}
\bibitem[B]{B}
A. Brown
\newblock {\em Mathematics}.
\end{thebibliography}
\end{document}