I'm using longtable and trying to use \marks. So far I've got no luck.
MWE:
\documentclass[a5paper,pagesize]{scrartcl}
\usepackage{longtable}
\usepackage{scrpage2}
\chead[\firstmark/\botmark]{\firstmark/\botmark}
\pagestyle{scrplain}
\newcommand*{\tablerow}[1]{%
#1\mark{#1}\tabularnewline[2cm]}
\begin{document}
\begin{longtable}{p{.9\textwidth}}
\tablerow{1}\tablerow{2}\tablerow{3}\tablerow{4}\tablerow{5}
\tablerow{6}\tablerow{7}\tablerow{8}\tablerow{9}\tablerow{10}
\tablerow{11}\tablerow{12}\tablerow{13}\tablerow{14}\tablerow{15}
\end{longtable}
\end{document}
In the result \firstmark and \botmark are always empty. Am I doing something wrong or is this a bug/limitation of longtable/LaTeX?
\firstmark. But why is\firstmark=\botmarkon the last page? – Martin Schröder Sep 07 '12 at 09:36\let\firstmark\botmarkyou are not supposed to use bare marks always marks with two fields accessed by leftmark and rightmark (not that I always follow the rules either) – David Carlisle Sep 07 '12 at 09:48\markbothand\rightmarkand\leftmarkin the example, on the last page it's still\rightmark==\leftmark. – Martin Schröder Sep 07 '12 at 09:54