Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In a table of contents that has been generated with LaTeX's \tableofcontents command, I would like to add a vertical space before a Chapter item in the table of contents. One way that I have in my notes is to use

\addtocontents{toc}{\protect\vspace{10pt}}

at a desired location in the document so that this gets processed by \tableofcontents to include an appropriate vertical space in the table of contents. I have two questions:

  1. Is the above the correct way to get a vertical space in a table of contents?

  2. Why is it necessary to use the \protect command here?

Thank you...

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted
  1. It's the correct way if it's just for fine tuning the final appearance of the table of contents; if it's a general need for all chapters, customizing directly the table of contents typesetting would be preferable.

  2. \addtocontents writes to the .toc file and this causes commands to be expanded, but you want to write \vspace{10pt} in the .toc file, not the instructions to leave a space (that will be done when the .toc file is read).

share|improve this answer
    
Thanks a lot for the answers. And 1 vote up. –  yCalleecharan Jul 14 '11 at 9:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.