0

I want different header of first page of the article and on rest of the pages I want author name and article name to appear alternately.

1

You can do this using the fancyhdr package and a conditional test for the page number; something like this:

\documentclass[twoside]{article}
\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate text for the example

\def\Author{The Author}
\def\Title{The Title}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[EC]{\Author}
\fancyhead[OC]{
\ifnum\value{page}=1\relax
Header for the first page
\else
\Title
\fi}
\fancyfoot[C]{\thepage}
\renewcommand\headrulewidth{0pt}

\begin{document}

\lipsum[1-20]

\end{document}

Unfortunately, no MWE was provided, so we don't know whether \maketitle is being used, in which case some modification will have to be done to let the plain style used by the page with the title use the fancy style; something along these lines:

\documentclass[twoside]{article}
\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate text for the example

\def\Author{The Author}
\def\Title{The Title}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[EC]{\Author}
\fancyhead[OC]{
\ifnum\value{page}=1\relax
Header for the first page
\else
\Title
\fi}
\fancyfoot[C]{\thepage}
\renewcommand\headrulewidth{0pt}
\makeatletter
\let\ps@plain\ps@fancy
\makeatother

\author{\Author}
\title{\Title}

\begin{document}

\maketitle
\lipsum[1-20]

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.