General ⇒ Short version of section only in header
Short version of section only in header
Good morning,
so my thesis has the title of the chapter/section in the header of each page. I'm using /section[short version]{long version} to reduce the text on the header, as some titles are too long. I figured the short version is also showing on my content - Is there a way to change that so that the long version shows in my content?
Two lines in my header could also work.
Thank you in advance!
so my thesis has the title of the chapter/section in the header of each page. I'm using /section[short version]{long version} to reduce the text on the header, as some titles are too long. I figured the short version is also showing on my content - Is there a way to change that so that the long version shows in my content?
Two lines in my header could also work.
Thank you in advance!
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Short version of section only in header
Btw, I tried fancyhdr but this overlaps the title with my paragraphs..
- Stefan Kottwitz
- Site Admin
- Posts: 10319
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Short version of section only in header
You can use \markright or \markboth, like this:
Stefan
Code: Select all
\section{Long Title}
\markright{Short Title}
% or \markright{Short Title}{Short Title}
LaTeX.org admin
Re: Short version of section only in header
Thank you for your answer, Stefan. I didn't get the expected result. This way, only the second time the title shows will it appear shortened. Plus, I'm missing the numbering.
I also realized I didn't explain myself quite well: Each page has either the title of the chapter or the title of the section (both with numbering)
I also realized I didn't explain myself quite well: Each page has either the title of the chapter or the title of the section (both with numbering)
Re: Short version of section only in header
I managed to fix it this way:
\sectionmark{Short version}
\section{Second section: Too much text for a running head}
\sectionmark{Short versions}
EDIT: Turns out sometimes \sectionmark is ignored...
\sectionmark{Short version}
\section{Second section: Too much text for a running head}
\sectionmark{Short versions}
EDIT: Turns out sometimes \sectionmark is ignored...
Re: Short version of section only in header
When the section starts on a new page, the first \sectionmark is ignored..
I tried this, but it's still not working..
I tried this, but it's still not working..
\sectionmark{On the Use of a Directly Modulated Laser in a Phase Modulated-Assisted}
\section[On the Use of a Directly Modulated Laser in a Phase Modulated-Assisted mmW Signal Generation and Transmission Link]{On the Use of a Directly Modulated Laser in a Phase Modulated-Assisted mmW Signal Generation and Transmission Link%
\sectionmark{On the Use of a Directly Modulated Laser in a Phase Modulated-Assisted}}
\sectionmark{On the Use of a Directly Modulated Laser in a Phase Modulated-Assisted}
- Stefan Kottwitz
- Site Admin
- Posts: 10319
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Short version of section only in header
Perhaps use this:
Stefan
Code: Select all
\renewcommand{\sectionmark}[1]{\gdef\rightmark{#1}}
LaTeX.org admin
Re: Short version of section only in header
That works fine, but removes the numbering from the header title..
- Stefan Kottwitz
- Site Admin
- Posts: 10319
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Short version of section only in header
Then take
Stefan
Code: Select all
\renewcommand{\sectionmark}[1]{\gdef\rightmark{\thesection\ #1}}
LaTeX.org admin
Re: Short version of section only in header
That did the trick! Thank you so much, Stefan!!