I'm TeXing a course for a teacher of mine, and he wants me to have the section titles in the headers (I use fancyhdr to achieve this). He also wants me to retain the section titles he gave me in the original (word) file.

Since some of these section titles are too long to fit in the header title, is there a way to define a shorter version that is to be used in the header?

Enabling multiple header lines would also do.

I'm using the book class.

  • what document class are you using? – Ian Thompson Apr 25 '11 at 20:53
  • @Ian ~ I'm using the book class. Put it in my question too. – romeovs Apr 25 '11 at 20:56

Just use the optional argument of \section in addition:

\section[short title]{long title}

This works for \chapter and other headings as well.

Note, that short title would be used in the table of contents as well. This is meaningful, in my opinion.

  • about 30 seconds quicker than me! – Ian Thompson Apr 25 '11 at 21:07
  • @Ian: just luck :) I'm sitting in the train and UMTS comes and goes frequently. Thanks for supporting. :-) – Stefan Kottwitz Apr 25 '11 at 21:09
  • wow... had no idea this existed!! – romeovs Apr 26 '11 at 6:54

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.