TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using these settings:



% title stuff here

The problem is that since the settings above are defined before \begin{document}, the rendering of table of contents causes error that undefined control sequence in \parttitle and \part, because the headers and footers also appear on the contents page (which I dont want). I think the error is due to the fact that no \part is defined before the TOC and hence there is no text to put in partitle, i.e. the right header.

So, how could I get rid of the header-footer in TOC, or what's another solution?

share|improve this question
I am not sure about your intent with the headers/footers. Remove \pagestyle{scrheadings} from the preamble and place it right after the firs \part command. This will prevent the error; I'm not sure however, if this is what you expect. – Gonzalo Medina Jun 6 '11 at 14:12
up vote 2 down vote accepted

To get rid of the error initialize your command (that's a good idea anyway) in the preamble: \newcommand\parttitle{}

To get another pagestyle (e.g. empty) in the toc do

share|improve this answer

To get rid of the headers/footers in ToC, you can use:

share|improve this answer
This give the wanted result only if the table of contents has at most 2 pages. – Ulrike Fischer Jun 6 '11 at 14:20
@Ulrike: that's right. – ℝaphink Jun 6 '11 at 14:43

Your Answer


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.