2

I added my BibTeX references following:

\cleardoublepage
\phantomsection

\nocite{*}
\bibliographystyle{plainnat} 
%\setlength{\bibsep}{3mm} 
\addcontentsline{toc}{chapter}{References}
\bibliography{bibliography}

but within my ToC the style is not adapted and the page numbering not aligned

The output looks like:

TOC excerpt

but References should be formated like Conclusion, including the chapter number and page number aligned right. How can I adjust the style of the added chapter to be formatted appropriate?

Here's a working example that illustrates it

\documentclass
[
a4paper,
english,
twoside,
11pt
]
{article}

\usepackage[pdftex]{graphicx}
\usepackage{float}           
\usepackage{amstext}         
\usepackage{enumerate}        
\usepackage[bottom]{footmisc} 
\usepackage{array}            
\usepackage{ntheorem}
\usepackage{theorem}
\usepackage{pdfpages}         
\usepackage{parskip}          
\usepackage{xcolor}           
\usepackage[hyphens]{url}     
\usepackage{makeidx}          
\usepackage{multicol}         
\usepackage[numbers, square]{natbib}  
\usepackage{listings}

\makeindex 

\begin{document}

\tableofcontents % ToC

% add odd sections to illustrate
\section{chapter 1}
\section{chapter 2}
\section{chapter 3}
\subsection{chapter 3.1}
\subsection{chapter 3.2}
\section{chapter 4}

\renewcommand{\bibsection}{\chapter{\bibname}}

% add chapter for references
\addcontentsline{toc}{chapter}{References}


\end{document}

The output in ToC is still References1, but the page number should be aligned right.

8

Since you are using natbib, which I guess from the style plainnat, I recommend redefining \bibsection in your preamble, instead of using \addcontentsline in the document:

\renewcommand{\bibsection}{\chapter{\bibname}}

Originally \bibsection uses \chapter* which doesn't create a TOC entry, in contrast to \chapter.

If you use a class without chapters, such as article, define it using \section and possibly \refname:

\renewcommand{\bibsection}{\section{\refname}}

With your minimal example, I got:

natbib section example

| improve this answer | |
  • 2
    @80leaves The bibliography won't be numbered if it's put after \backmatter in the book class. – egreg Oct 30 '11 at 11:59
  • This makes the bibliography receive an appendix letter if it appears after an \appendix command. How can this be avoided? – oarfish Sep 18 '15 at 14:34
  • @oarfish That's the way \appendix works - following chapters get a letter instead of a number. But it depends on the class. Perhaps ask this as a new question. – Stefan Kottwitz Sep 18 '15 at 15:28

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.