Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

\sectionmark does not affect mark on current page

1,404 views
Skip to first unread message

Piet van Oostrum

unread,
Aug 25, 1994, 9:02:05 AM8/25/94
to
>>>>> stra...@urk.gmd.de (Paul Stravers) (PS) writes:

PS> There seems to be a bug in LaTeX2e (but LaTeX-209 also shows this
PS> problem) with \sectionmark, or alternatively, with \markright.

PS> In a book-style document I have a \section{} with a title that is
PS> slightly too long for a mark. So I used \sectionmark{ABBREVIATED
PS> SECTION TITLE} and this works EXCEPT for the first page, that is the
PS> page where the \section{} starts. That page STILL is marked with the
PS> (capitalized) long \section{} title.

PS> I tried \markright{} and \markboth{}{}, but the problem remained. I tried to
PS> put the \sectionmark{} before and after the \section{} line, but nothing
PS> changed.

\rightmark according to the LaTeX code is like TeX's \firstmark, i.e. the
first one you give on a page is the one that is taken. So if your page
starts with a \section command the implicit mark that the \section command
generates (by calling \sectionmark) is established and there is no way you
can undo this. On subsequent pages, the mark is usually inherited from the
previous page, so then the last one that was encountered is taken, unless
of course your \section command happens to fall at the beginning of the
page.

Putting the \sectionmark before the first \section command should help I
think (contrary to what you say above), but the standard definition of
\sectionmark refers to \thesection, which should give you the number of the
previous section, so that is not a feasible solution either.
If you have a \chapter command on that page even this will not help, as the
\chaptermark uses \markboth and establishes an empty \rightmark.

I think the best solution would be to disable the sectionmarking temporarily
like:

\let\mysectionmark\sectionmark
\renewcommand\sectionmark[1]{}
\section{With a very long title}
\let\sectionmark\mysectionmark
\sectionmark{Short title}

modulo typing errors (I haven't tested but you get the idea)
--
Piet* van Oostrum, Dept of Computer Science, Utrecht University, (*`Pete')
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31 30 531806 Telefax: +31 30 513791 Internet: pi...@cs.ruu.nl
PGP public key by finger or WWW http://www.cs.ruu.nl/~piet

0 new messages