[texhax] Plain TeX headline issue

Paul Isambert zappathustra at free.fr
Sat May 1 16:38:07 CEST 2010


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

Best,
Paul


Rodolfo Medina a écrit :
> Hi.
>
> 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?
>
> Thanks for any help
> Rodolfo
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>   



More information about the texhax mailing list