[texhax] Plain TeX headline issue

Rodolfo Medina rodolfo.medina at gmail.com
Sat May 1 17:31:25 CEST 2010


Rodolfo Medina a écrit :

>> In order to have the section name in the headline, I've been using the plain
>> TeX commands `\mark' and `\botmark'.  But, suppose that I want the section
>> name in the leftheadline and the subsection name in the rightheadline: then
>> I'd need two different \mark(s), whereas \mark is just one.  Can anyone
>> suggest how it is possible to achieve what i want?


Paul Isambert <zappathustra at free.fr> writes:

> Try something like this (supposing you have \section and \subsection macros
> with the name of the section as the argument):
>
> \def\section#1{%
>  \mark{{#1}{}}%
>  \def\currentsection{#1}%
>  % definition of \section
> }
> \def\subsection#1{%
>  \mark{{\currentsection}{#1}}
> % definition of \subsection
> }
>
> Then, the left headline calls \doleftmark and the right headline calls
> \dorightmark:
>
> \doleftmark#1#2{#1}
> \dorightmark#1#2{#2}
>
> And this must me called on an expanded \botmark (or other), e.g.:
>
> \expandafter\doleftmark\botmark



Thanks for your suggestion.  But you didn't say how to define \doleftmark and
\dorightmark.

Rodolfo



More information about the texhax mailing list