The presence of floats appears to disrupt the setting of \mark
s, so that \topmark
ends up with the wrong value.
For example, consider this:
\documentclass{article}
\textheight 50mm
\textwidth 50mm
\makeatletter \def\@oddhead{[\topmark/\firstmark/\botmark]} \makeatother
\def\block#1{\textbf{#1}\mark{#1}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
Foo bar baz.\par}
\begin{document}
\block a
\block b
\block c
\block d
%\begin{figure}\hrule width 1pt height 20mm depth 0pt \end{figure}
\block e
\end{document}
That works as it should: the page break appears in the middle of block 'c', blocks 'd' and 'e' start on page 2, and the header therefore shows '[c/d/e]'. That's correct.
If I uncomment the {figure}
line, however, then the 'figure' appears on page 3, and page 2 is unchanged (page breaks within blocks 'c' and 'e'), but the header now shows '[d/d/e]'.
I am perplexed as to why this happens. I can't find anything in \@float
or \@caption
which touches the marks, and in general nothing in latex.ltx
that uses \markboth
or \markright
(which are the only things in latex.ltx
which call \mark
). article.cls
has a few things that call \@mkboth
, but they're associated with \@part
, and with lists of figures and the index.
What is it I'm missing?
\box255
. Having said that, at least some of the float placement algorithm takes place within the\output
routine, so I can imagine something going wrong here. Perhaps the answer is that TeX's\mark
isn't supported within LaTeX. – Norman Gray Aug 3 '10 at 13:48