1

Possible Duplicate:
How can I display a short chapter name in the header and a long chapter name in the TOC?

I do the typesetting for a book. There are large chapter and section headers, so that the pageheader overflows. Is there a possibility to limit or shorten the page header with "..." for example?

I know that i can use \section[short]{long} but in my case I want only to short it.

Compare: enter image description here

Here is the very simple solution:

\usepackage{scrpage2}
\usepackage[fit]{truncate}
\pagestyle{scrheadings}
\clearscrheadfoot
\clearscrheadings
\clearscrplain
\lehead{\truncate{\textwidth}{\headmark}}
\rohead{\truncate{\textwidth}{\headmark}}
\lefoot{\pagemark}
\rofoot{\pagemark}

Compare: enter image description here

References:

  • Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. – Torbjørn T. Dec 02 '11 at 11:02
  • 1
    ftp://ftp.mpi-sb.mpg.de/pub/tex/mirror/ftp.dante.de/pub/tex/macros/latex/contrib/truncate/truncate.pdf – user1077146 Dec 02 '11 at 11:02
  • @Matthias: It is always better to add a short explanation to your links. You link to the PDF manual on a specific mirror. It would be better to link to the general mirror URL (http://mirror.ctan.org/macros/latex/contrib/truncate/truncate.pdf) instead. This way people will use the nearest mirror automatically and the load is spread over different mirrors. Normally we link to the CTAN entry (http://www.ctan.org/pkg/truncate, formatted as truncate) instead, so that people can have a look on the package description. – Martin Scharrer Dec 02 '11 at 11:49
  • @MartinScharrer i can not add the links because i have no rights to do that... and i can not answer to my own question :( – user1077146 Dec 02 '11 at 11:58
  • There is no need to reference something as well known as the KOMA script. Also as long the packages are on CTAN under their own name people should find them. Please only post solutions to the asked question as an answer post. – Martin Scharrer Dec 02 '11 at 14:21
  • 1
    Like Martin said, we'd like to keep answers separate from questions, so you should write a separate answer instead of editing your answer into the question. Self-answers are perfectly admissible, and a well-written answer may earn you additional reputation. – lockstep Dec 02 '11 at 16:30

0 Answers0