1

I have the following MWE

\documentclass[12pt]{report}
%-> For bibliography
\RequirePackage[num, overcite]{abntex2cite}

%-> Generate dummy text
\usepackage{lipsum}

%-> Change section numbering style
\renewcommand{\thesection}{\arabic{section}}

%-> Add References to ToC
% \RequirePackage[nottoc, section]{tocbibind}


\begin{document}
\tableofcontents

\newpage
\section{Section one}
\lipsum[1-2]

And here, in this paragraph, I need to cite someone~\cite{ClrT10ca}. This reference will appear in the bibliography area below.

\section{Section two}
\lipsum[3]



\bibliographystyle{abntex2-num}
\bibliography{bib}
\end{document}

with bib file content

@article{ClrT10ca,
    author = {Tracey M. Clarke and James R. Durrant},
    title = {Charge Photogeneration in Organic Solar Cells},
    journal = {Chemical Reviews},
    volume = {110},
    number = {11},
    pages = {6736-6767},
    year = {2010}    }

If I uncomment the \RequirePackage[nottoc, section]{tocbibind}, the bibliography appears in the ToC, but its configuration suffers a lot of modification in the Bibliography section.

My question is: how can I add the Bibliography to Table of Contents without changing the bibliography style?

1
  • The bibliography style does not change. Also, don't use RequirePackage, use \usepackage in the main .tex file.
    – user9424
    Apr 16, 2019 at 17:14

2 Answers 2

2

The bibliography style does not change. What caused the change in heading style was the option section in tocbibind. Also, don't use RequirePackage, use \usepackage in the main .tex file.

\documentclass[12pt]{report}
%-> For bibliography
\usepackage[num, overcite]{abntex2cite}

%-> Generate dummy text
\usepackage{lipsum}

%-> Change section numbering style
\renewcommand{\thesection}{\arabic{section}}

%-> Add References to ToC
\usepackage[nottoc%, section
]{tocbibind}


\begin{document}
\tableofcontents

\newpage
\section{Section one}
\lipsum[1-2]

And here, in this paragraph, I need to cite someone~\cite{ClrT10ca}. This reference will appear in the bibliography area below.

\section{Section two}
\lipsum[3]



\bibliographystyle{abntex2-num}
\bibliography{bib}
\end{document}

enter image description here

2

I have tried your MWE and as you say the Bibliography heading gets changed when using your use of tocbibind. Try using

\usepackage[nottoc, chapter]{tocbibind}

instead.

However I see you are using the report class where one normally uses \chapter before \section. If, as expected, you had \chapters in your MWE then

\usepackage[nottoc]{tocbibind}

would make everything consistent.

If you don't want to use \chapter then use a class, like article, which does not expect them.

2
  • How does your answer differ from mine? Or maybe we posted at the same time?
    – user9424
    Apr 16, 2019 at 18:31
  • I prepared my answer but when I posted it yours was there although it hadn't been when I started. Our answers do provide slightly different information. Apr 17, 2019 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .