Page LayoutMaking the headers differ from the table of contents

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
liquido
Posts: 1
Joined: Sun Sep 27, 2009 2:55 pm

Making the headers differ from the table of contents

Post by liquido »

To avoid overlapping headers in my output file, I choose a shorter name for my sections in brackets, for example

\section[Existence]{Existence of knot factorizations}

so that in the main body of the text, the name of the section is "Existence of knot factorizations", while in the header it says only "Existence".

The deal is that not only does this change the header, but also the table of contents. I want the table of contents to contain the full title of the section "Existence of knot factorizations" instead of just "Existence", while the header still maintains the shorter title "Existence". Any way of getting around this?

Kind regards.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Making the headers differ from the table of contents

Post by gmedina »

Hi,

you can use the \markboth or \markright commands, as the following simple example suggests:

Code: Select all

\documentclass{article}
\usepackage{lipsum}% just to generate some text

\pagestyle{headings}

\begin{document}
\tableofcontents

\section{Existence of knot factorizations}
\markboth{}{Existence}
\lipsum[1-30]
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply