[tex-eplain] Running heads for pdftex or luatex documents.

Dustin Tucker dtuck at umich.edu
Tue Jul 16 21:57:15 CEST 2013


On Jul 16, 2013, at 2:45 PM, john Culleton <John at wexfordpress.com> wrote:

> Eplain covers most of the simple necessities for document formatting.
> Notably missing are running heads. For e.g., a novel the author goes on
> verso pages and the title goes on recto pages. For non-fiction it is a
> little more complicated.
> 
> The Eplain manual itself has running heads. What code was used to
> create them?

I'm no expert here, but I think a basic (plain tex) solution would be

\headline{\ifodd\pageno ... \else ... \fi} .

The following would center contents of \author and \title with a page number on the outer corner:

\def\runr{\rlap{\folio}\hfil\author\hfil}
\def\runl{\hfil\title\hfil\llap{\folio}}
\headline{\ifodd\pageno\runr\else\runl\fi}

That won't get you the standard blank header on the first page, though. I don't know if there's a more elegant way to do that, but if nothing else this would work:

\headline{\ifnum\pageno=1\hfil\else\ifodd\pageno\runr\else\runl\fi\fi}

(Or maybe that \hfil should be \relax; I have no idea what, if anything, the difference would be, and I can't test it right this moment.) Something similar (probably with a new conditional) should work fine if you want, say, the first header of every chapter to be blank.

Dustin


More information about the tex-eplain mailing list