Page Layout ⇒ problems with sectionmark
problems with sectionmark
I had some problems with the header of certain pages because my section titles were quite long. I found that I could use the \sectionmark command to include the short title in the header but the complete one in the table of contents. This command solved most of my problems, but there is one page which begins with a new section where the header is not correct (so it seems that the \sectionmark is not working in this case). I tried to write the \sectionmark command right before the section but it did not work..
Does anybody know how I could solve it?
Thanks!!
Silvia
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
problems with sectionmark
in that case call \sectionmark twice like this:
Code: Select all
\section[short or original version]{original version%
\sectionmark{head mark version}}
\sectionmark{head mark version}
Re: problems with sectionmark
problems with sectionmark
I had the same problem and hopefully found that solution, thank you.
In the first place, I tried without the option :
Code: Select all
\section{original version%
\sectionmark{head mark version}}
\sectionmark{head mark version}
Apparently, the "option" is required for this trick to work :
Code: Select all
\section[short or original version]{original version%
\sectionmark{head mark version}}
\sectionmark{head mark version}
Best regards,
O.C.
Re: problems with sectionmark
I'm having trouble since this doesn't work in the book class (at least not for me).
Any help?
Thanks
Diego
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
problems with sectionmark
For an adequate problem description you should prepare a proper minimal example. And perhaps it's better to open a new thread instead of hijacking a solved topic and possibly refer to this topic here by a link.thefloyd wrote:[…] I'm having trouble since this doesn't work in the book class (at least not for me). […]
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10