4

I don't know why I have different margins in my table of contents.

It looks like this, and I would like to have all the lines with the same margin.

a

All of those are chapters, and Bibliography ad list of figures are chapters too, so I don't know why it looks like that.

Thank you for your answers. Sorry for not being very specific. I have this code:

\documentclass[12pt, notitlepage]{report}

\usepackage[style=numeric, backend=bibtex, sorting=nyvt]{biblatex}
\addbibresource{references.bib}

\usepackage[nottoc]{tocbibind}%I use this package to add bibliography and list of figures to the table of contents


\begin{document}
    \renewcommand{\chaptername}{}
    \renewcommand{\thechapter}{}%I use this command to eliminate the numbers of the chapters

\tableofcontents

\chapter{Introduction}

\chapter{Research}

\printbibliography
\addcontentsline{toc}{chapter}{Bibliography}
\end{document}

And I get this: enter image description here

I would like to have the bibliography at the same level as the other chapters, or viceversa, the chapters at the same level as the bibliography.

  • 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}. – egreg Nov 29 '15 at 0:37
  • So, do i get this right, your question is: How to get unnumbered chapters? – Johannes_B Nov 29 '15 at 12:03
  • No, my question is: How can "Bibliography" be at the same level as "Introduction" and "Research" in the table of contents? – Oscar Nov 29 '15 at 12:14
  • Why are you changing the commands for chaptername and thechapter? – Johannes_B Nov 29 '15 at 12:22
  • 1
    Note also, that your way created a vertical shift in the chapter title for the numbered chapters. – Johannes_B Nov 29 '15 at 12:46
4

Set the counter for secnumdepth to get unnumbered chapter.

\documentclass[12pt, notitlepage]{report}

\usepackage[nottoc]{tocbibind}
\usepackage{geometry}
\geometry{showframe}
\usepackage[style=numeric, backend=bibtex, sorting=nyvt]{biblatex}
\addbibresource{biblatex-examples.bib}

\setcounter{secnumdepth}{-1}
\begin{document}

\tableofcontents

\listoffigures
\listoftables
\chapter{Introduction}
\cite{companion}
\chapter{Research}
\printbibliography[heading=bibintoc]
\end{document}
  • Thank you! The \setcounter{secnumdepth}{-1} works perfect – Oscar Nov 29 '15 at 12:43
1

Try to add \usepackage[titles]{tocloft} then \setlength{\cftbeforechapskip}{2mm} in the preambule of your document.

Edit: This last answer had nothing to do with the problem apparently. For your problem, defining the heading of the bibliography seems to do the job (at least for the bibliography). Add

\defbibheading{bibheading}[\bibname]{%
  \chapter{#1}}

then \printbibliography[heading=bibheading]

and remove the \addtocontents line. The MWE is (I had to create a dummy bibliography to have it appearing)

\documentclass[12pt, notitlepage]{report}

\usepackage[style=numeric, backend=bibtex, sorting=nyvt]{biblatex}
\addbibresource{references.bib}

\usepackage[nottoc]{tocbibind}%I use this package to add bibliography and list of figures to the table of contents

\defbibheading{bibheading}[\bibname]{%
  \chapter{#1}}


\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\begin{document}
    \renewcommand{\chaptername}{}
    \renewcommand{\thechapter}{}%I use this command to eliminate the numbers of the chapters


\tableofcontents

\chapter{Introduction}

Some text.\cite{A01}

\chapter{Research}

\printbibliography[heading=bibheading]

\end{document}

  • Yes, it works for Bibliography, thanks. Do you have any clue for list of figures? – Oscar Nov 29 '15 at 12:31
  • 2
    @Oscar You are trying to cure a problem you created. Remove the cause of the problem instead of fixing the issues that arrive. – Johannes_B Nov 29 '15 at 12:33
  • @Oscar Edit you MWE to include a list of figures and people will see what they can do. – HcN Nov 29 '15 at 12:33
  • @Johannes_B Do you think the problem will not appear at all using \chapter* with an appropriate number of \addcontentsline ? – HcN Nov 29 '15 at 12:36
  • Compare the the actual chapter titles and their vertical placement. – Johannes_B Nov 29 '15 at 12:47

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.