# [texhax] Marks

Stan texforeverything at att.net
Wed Oct 22 07:15:47 CEST 2014

```Philip,

Isn't this the situation described on page 260 in the TeXbook?

Stan

On Tue, 21 Oct 2014 08:51:43 -0500, Philip Taylor <P.Taylor at rhul.ac.uk>
wrote:

> TeX defines three marks :  \firstmark, \topmark and \botmark. \firstmark
> contains the value (if any) of the first \mark on the current page;
> \botmark similarly contains the value (if any) of the last \mark on the
> current page; and \topmark contains the value (if any) of the last mark
> encountered before the start of the current page.
>
> Now, consider a document which consists of a large number of headed
> sections; usually one or more sections will fit neatly onto a single
> page, but occasionally a section will start on one page and continue on
> the next.  In those circumstances, it would be very helpful to the
> reader if the header of the section that started on an earlier page
> could be reflected in the running head, because otherwise if he/she
> lands on that page by chance, he/she will not know the context of the
> text at the top of the page since its header will have appeared on a
> previous page and thus not be visible.  How, then, might I construct
> \headline such that it contains \topmark if the page does /not/ start
> with a header, and \firstmark if it does (it is the headers themselves
> that contribute the \marks to the page).
>
> Philip Taylor
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/