[texhax] Heading question

Donald Arseneau asnd at triumf.ca
Wed Feb 27 12:21:16 CET 2008

"D. R. Evans" <doc.evans at gmail.com> writes:

> \headline={\ifnum\count0>1 {\ifodd\count0 \hss \it \ifx\topmark\botmark
> \else \topmark \fi \hss \else \hss \it <book name> \hss\fi}\fi}
> but the \ifx always calls the false branch -- probably I am
> misunderstanding something about what gets expanded when \ifx is called

Yes. \ifx expands nothing (besides itself:-) but compares the
meaning of the next two tokens. \topmark does not have the same
meaning as \botmark; they are different tokens.  You are 
thinking of them as macros, but they are built-in tokens.
Verify by \show.

An analogous mistake would be:


Anyway, I don't think even the intent makes much sense.
Rather, I'd suggest


Then in your \chapter macro(s)

 \null \vfill \eject \global\specialpagetrue

and your headline tests \ifspecialpage, and also performs

Donald Arseneau                          asnd at triumf.ca

More information about the texhax mailing list