[texhax] Heading question

D. R. Evans doc.evans at gmail.com
Wed Feb 27 03:05:28 CET 2008

D. R. Evans said the following at 02/26/2008 09:31 AM :
> I am trying to do the following, but I can't figure out how to implement it :-(
> 1. I have a book in which the chapters have titles.
> 2. On even-numbered pages, the headline should always be the title of the book.
> 3. On odd-numbered pages, the headline should be the title of the current
> chapter EXCEPT that if a new chapter starts on that page, the headline
> should be empty.

> \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

Seeing no response, I've just spent another hour on this, trying variations
on the above theme, and it's now clear that I'm not understanding something

If I make the \ifx test so that it reads:
  \ifx a a S \else D
it still chooses the false branch every time (i.e., prints "D"); my poor
little brain says that "S" should be printed every time instead. Can
someone please put me out of my misery?


More information about the texhax mailing list