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.

is there a way to show the short title in the TOC instead of the long version?

For example, when I do:

 \chapter[short version]{longer version that describes things in a verbose way}

Is there a way for showing the [short version] instead of the {...} in the TOC?

share|improve this question
4  
But using \chapter[short version]{longer version that describes things in a verbose way} will precisely show "short version" in the ToC. –  Gonzalo Medina Aug 3 '11 at 0:48
5  
If, for some reason, you are getting a different result, then please add a minimal working example illustrating this odd behaviour. –  Gonzalo Medina Aug 3 '11 at 1:10
    
The class I'm using doesn't do this... it uses the short version in the headers and the long version in the ToC. The answer below solves my problem. –  Rafael S. Calsaverini Aug 3 '11 at 19:23
    
And that's why a minimal working example is always appreciated. –  Gonzalo Medina Aug 3 '11 at 21:12

1 Answer 1

up vote 4 down vote accepted

the document class amsbook will use the short version only for running heads; the long version goes into the toc. what must be done is to suppress the "normal" entry from the toc, and explicitly replace it with the desired version.

this is covered in an entry in the ams author faq. briefly, the instruction there is this: in the preamble,

\DeclareRobustCommand{\SkipTocEntry}[4]{} 

replacing the 4 by 5 if hyperref is used. then, enter your \chapter information as follows:

\addtocontents{toc}{\SkipTocEntry}
\chapter{Heading that should be replaced}
\addtocontents{toc}{\protect\contentsline{chapter}%
  {\protect\tocchapter{Chapter}{\thechapter}%
    {Substitute toc text}}%
  {\thepage}} 

note that the \protects are necessary. this also works for other sectioning commands besides \chapter.

the \SkipTocEntry command cannot be entered before an \include command in a driver file; it must be in the same file as the heading being omitted.

share|improve this answer

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.