There's little need to tap into the \author
and/or \title
macros to extract what you need. It's probably just as easy to retype the authors and short title in a fancyhdr
implementation.
If you're using a twoside
setup, then fancyhdr
allows for specifying a E
ven/O
dd header:
\documentclass[twoside]{article}
\usepackage{fancyhdr,lipsum}
\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\fancyhead[CE]{[running authors]}% Centred header on Even page
\fancyhead[CO]{[Short title]}% Centred header on Odd page
\begin{document}
\thispagestyle{plain}
\lipsum[1-20]
\end{document}
Setting \thispagestyle{plain}
ensures that the first page has the default plain
page style. The above also assumes that you're using a twoside
article display.
If you're not using a twoside
article, then you could condition on whether or not \value{page}
is odd/even - inside the header/footer this is fine, as page styles are set appropriately during shipout; one reason why \thepage
works in these areas.
\documentclass{article}
\usepackage{fancyhdr,lipsum}
\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\fancyhead[C]{%
\ifodd\value{page}\relax
[Short title]% Odd page header
\else
[running authors]% Even page header
\fi}
\begin{document}
\thispagestyle{plain}
\lipsum[1-20]
\end{document}
Fundamentally, both approaches above assume that the opening page is numbered 1
(odd), making the second page even, and so forth.