[texhax] Headline numbering problem

Oleg Katsitadze olegkat at gmail.com
Mon Aug 13 17:10:31 CEST 2007


On Mon, Aug 13, 2007 at 04:26:06PM +0200, Rodolfo Medina wrote:
>   \headline={\the\subchapternumber}

You need to use \mark, see The TeXbook.  The problem with using
sectioning counters directly is that TeX needs to read ahead to decide
a page break, so in your case, the subchapter from the next page is
processed (and \subchapternumber is incremented) before TeX decides to
break the page before that subchapter.  To avoid this problem, marks
let you refer to the first/last mark on a boxed page.

Best,
Oleg


More information about the texhax mailing list