Page Layout ⇒ Heading Numbers overlap Heading Titles in ToC
Heading Numbers overlap Heading Titles in ToC
Hi folks,
I am currently have some issue with the table of contents looking clinched (please see attachment).
Is this a common problem? It used to be that I just had to hit "PDFLaTeX" like four times and then hit "View PDF" and it would look fine, that trick is not working anymore.
Does anyone know what is the problem?
I am currently have some issue with the table of contents looking clinched (please see attachment).
Is this a common problem? It used to be that I just had to hit "PDFLaTeX" like four times and then hit "View PDF" and it would look fine, that trick is not working anymore.
Does anyone know what is the problem?
- Attachments
-
- ToC-overlapping.png (30.86 KiB) Viewed 14783 times
Last edited by localghost on Sun Jan 20, 2013 1:21 pm, edited 1 time in total.
Reason: Image cut to the relevant content.
Reason: Image cut to the relevant content.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Heading Numbers overlap Heading Titles in ToC
It looks like a spacing issue with the ToC. It would be better if you posted a
minimal working example.
I would suggest that you look at the package tocloft to fine tune the spacing issues.
Regards.

I would suggest that you look at the package tocloft to fine tune the spacing issues.
Regards.
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Heading Numbers overlap Heading Titles in ToC
Does that mean you want to see my like
\usepackage
declarations? I would rather not post the whole TeX document on here.Heading Numbers overlap Heading Titles in ToC
No, people are not interested in the whole document
You can remove all the text matter and prune others to such an extent that it just reproduces the problem. Unless you show that code, people will not be able to help you completely.
In your case, it could have been a piece of code similar to this
Of course, you can also add section and subsections to exhibit the problem you are facing.

In your case, it could have been a piece of code similar to this
Code: Select all
Code, edit and compile here:
\documentclass{book}\usepackage{lipsum}\begin{document}\tableofcontents\chapter{Introduction}\lispum[1-2]\chapter{Hadrons}\lipsum[5-6]\chapter{Leptons}\lipsum[50-55]\end{document}
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Heading Numbers overlap Heading Titles in ToC
Code: Select all
Code, edit and compile here:
%\documentclass[12pt]{revtex4-1}\documentclass[showpacs,preprintnumbers,amsmath,amssymb, nofootinbib]{revtex4-1}%\usepackage{tocloft}\usepackage{color}\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}\usepackage{float}\usepackage{url}\usepackage{chngcntr}\usepackage{hyperref}\counterwithin{equation}{section}\counterwithin{figure}{section}\counterwithin{table}{section}\usepackage{amsmath}\usepackage{lineno}\usepackage{etex}\usepackage{bm}%%%%%%%%%%%FEYNMAN STUFF\usepackage{feynmp}\DeclareGraphicsRule{.1}{mps}{.1}{}%\usepackage{pst-pdf}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\hypersetup{colorlinks,linkcolor=blue,filecolor=black,urlcolor=blue,citecolor=black}\usepackage{varioref}\usepackage{graphicx}\newcommand{\dirac}[1]{\vert #1 \rangle}\newcommand{\bra}[1]{\langle #1}\newcommand{\vecbf}[1]{\vec{\textbf{#1}}}\makeatletter\def\endfmffile{%\fmfcmd{\p@rcent\space the end.^^J%end.^^J%endinput;}%\if@fmfio\immediate\closeout\@outfmf\fi\ifnum\pdfshellescape=\@ne
Last edited by cgnieder on Sun Jan 20, 2013 6:05 pm, edited 1 time in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Heading Numbers overlap Heading Titles in ToC
jgomez2, would you be so kind to visit the link given by mas? I mean this one:
minimal working example, with a focus on minimal, such as
It still shows the problem:
It's much easier to fix then. In this case, just insert this right after
The problem is gone:
The reason is, that RevTeX computes dimensions in the TOC lines(width of section numbers) but following lists of figures or tables change this calculation. The code above simply disables this faulty behavior.
Stefan

Code: Select all
Code, edit and compile here:
\documentclass{revtex4-1}\begin{document}\tableofcontents\listoffigures\section{Brief Review of Necessary Quantum Mechanics}\subsection{Dirac Notation}\subsection{Quantum Mechanical Vector Projections}\subsubsection{Vector Addition}\subsection{Heisenberg Uncertainty Principle}\subsection{Feynman Diagrams}\end{document}
It's much easier to fix then. In this case, just insert this right after
\tableofcontents
:Code: Select all
Code, edit and compile here:
\makeatletter\let\toc@pre\relax\let\toc@post\relax\makeatother
The reason is, that RevTeX computes dimensions in the TOC lines(width of section numbers) but following lists of figures or tables change this calculation. The code above simply disables this faulty behavior.
Stefan
Last edited by Stefan Kottwitz on Sun Jan 20, 2013 7:47 pm, edited 1 time in total.
LaTeX.org admin
Re: Heading Numbers overlap Heading Titles in ToC
understood, will do better next time
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Heading Numbers overlap Heading Titles in ToC
Great!
So I shortened my explanation above, to stay focused. Btw. very good that your example was compilable.
As you already showed more code, a few further tipps:

As you already showed more code, a few further tipps:
-
\usepackage{color}
can be removed since you loadxcolor
. - You don't need to load
amsmath
too, as RevTeX does it for you already. -
chngcntr
could be omitted if you use \numberwithin of amsmath, such as\numberwithin{equation}{section}
. - This chapter line doesn't match the meaning of LaTeX:
Better don't use font commands in heading commands, just the text. Instead, format your headings document-wide. It would be better structured and consistent, and note that the heading text may be used in the table of contents and in headers, which should not be huge for sure. Even if it's not visible here with RevTeX - just a general remark.
Code: Select all
Code, edit and compile here:\begin{center}\chapter{{\Huge \textbf{CHEM 705 Section 1: Particle Physics}}}\end{center}
LaTeX.org admin