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
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- 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