0

I am trying to add the bibliography (but called references) to my TOC. I use XeLatex for font reasons. My issue is not getting the line there, it's that the line is not aligning to the other chapters in the TOC.

So to change the name from bibliography to references I've added this to my preamble:

\renewcommand\bibname{References}

And then i my document (it's document class book)

\begin{document}

...

\chapter{\sffamily{Concluding remarks}} %concluding remarks
\newpage

\chapter{\sffamily{Acknowledgements}} %acknowledgements
\newpage

\addcontentsline{toc}{chapter}{\sffamily References}
\bibliographystyle{abbrv}
\bibliography{referens}

\end{document}

Problem is in my TOC it turns out like this, so that the Reference"chapter" is not aligned with the other chapters, exemplified here with concluding remarks and acknowledgements. enter image description here

Can anyone help me with a suggestion to fix it?

  • 2
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}! – ebosi Jul 11 '16 at 10:51
  • 1
    Such fragments are not useful at all. – user31729 Jul 11 '16 at 10:52
  • Seeing the snippet you gave, I would go for chapter numbers (that would be aligned with the R of References) before Concluding remarks and Acknowledgments that are not printed/printed in white, and a remaining white space as artifact... – ebosi Jul 11 '16 at 10:53
  • \addcontentsline{toc}{chapter}{\protect\numberline{}\sffamily References}, but I suspect that the first two chapters are used without numbers at all – user31729 Jul 11 '16 at 10:55
  • @ChristianHupfer Would have guessed the same. Do you want to add an answer, or do you have aduplicate at hand? – Johannes_B Jul 17 '16 at 12:08
2

I suggest to use an \addcontentsline without \numberline:

\documentclass{book}

%\usepackage{tocbibind}
\begin{document}
\tableofcontents

\chapter{\sffamily{Concluding remarks}} %concluding remarks

\chapter{\sffamily{Acknowledgements}} %acknowledgements

\addcontentsline{toc}{chapter}{\protect\numberline{}\sffamily References}
\backmatter

\cite{Lam94}
\bibliographystyle{abbrv}
\bibliography{biblio}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.