Hi,
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
Page Layout ⇒ problems with sectionmark
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
problems with sectionmark
Hi Silvia,
in that case call \sectionmark twice like this:
Stefan
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}
LaTeX.org admin
Re: problems with sectionmark
It works!!!! Thanks a lot Stefan!!
problems with sectionmark
Hello,
I had the same problem and hopefully found that solution, thank you.
In the first place, I tried without the option :
which led to the error "Fatal error occurred, no output PDF file produced".
Apparently, the "option" is required for this trick to work :
But this it really black magic to me. Shouldn't we consider that it is a bug when the section mark is not correctly set by \sectionmark{...} ? Where shall it be signaled ? Or has it already been signaled ?
Best regards,
O.C.
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
Hi,
I'm having trouble since this doesn't work in the book class (at least not for me).
Any help?
Thanks
Diego
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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10