4

i want to suppress the item number of bibliography in the Table of contents. Searched a lot but could not find any relevant and easy fix for it. i use the following code.

// preambles
\documentclass[12pt]{report}
\SOME MORE PACKAGES
\usepackage[nottoc,numbib]{tocbibind}


// main.tex file
\input{chap1.tex}
\input{chap2.tex}
\input{bib.tex}


 // bib.tex file
 \titleformat{\chapter}{}{}{0em}{\bf \huge} 
 \begin{thebibliography}{99} 
    \bibitem{asdf}  
       X Y Z.
    \bibitem
       A B C
 \end{thebibliography}

Current output

4 Conclusions ..... 30
5 Bibliography      32
Appendices          40
...

Expected output

4 Conclusions ..... 30
Bibliography        32
Appendices          40
...

Please suggest. I use \input{bib} for inserting my bibliography and i dont have the time fix it using \bibliography command. Found a lot of solutions. But wasnt able to incorporate in my current latex code

Note: I managed to remove the chapter number in the Bibliography section using the \titleformat{...} line. But I am not able to remove it from Table of contents.

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – karlkoeller Jan 13 '15 at 5:51
5

What you have to do is to simply remove the option numbib when loading tocbibind, so write

\usepackage[nottoc]{tocbibind}

instead of

\usepackage[nottoc,numbib]{tocbibind}

If you use the numbib option, you are telling LaTeX that you want a numbered bibliography...

Note that if you do that, you don't even need the line

\titleformat{\chapter}{}{}{0em}{\bf \huge}

in your .bib file.

MWE (just to show that it works):

\documentclass[12pt]{report}
\usepackage[nottoc]{tocbibind}

\begin{document}

\tableofcontents

\chapter{Test}

\nocite{*}
 \begin{thebibliography}{99}
    \bibitem{asdf}
       X Y Z.
    \bibitem
       A B C
 \end{thebibliography}
\end{document}

Output (ToC):

enter image description here

and the bibliography

enter image description here

As a side note, never use \bf in a LaTeX document, but \textbf or \bfseries. See for example "Correct" way to bold/italicize text? for reference.

  • i feel really silly. should have understood first instead of just using the solution from other sources! – Pogo Jan 13 '15 at 6:13
  • @Pogo Don't feel silly. Everyone can make mistakes ;-) – karlkoeller Jan 13 '15 at 6:15

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.