
Tento adicionar um título curto nas páginas pares e o autor nas páginas ímpares de um documento, usando este código:
\documentclass[11pt]{article}
\usepackage{lipsum}
\title{\bf THE TITLE}
\author{FIRST AUTHOR\footnote{{\tt [email protected]} Address}
\and SECOND AUTHOR\footnote{second author address}
\and THIRD AUTHOR\footnote{third author address}}
\date{~}
\begin{document}
\maketitle
\pagestyle{myheadings}
\markboth{The short title}{F. Author S. Author T. Author}
\lipsum
\lipsum
\end{document}
Como pode ser observado, o autor é inserido no topo das páginas pares (como nas páginas ímpares) e não o título curto como desejo.
Realmente não sei como consertar, mantendo o mesmo layout do documento (margens, largura, comprimento etc.) da article
classe.
Qualquer ajuda seria apreciada.
Responder1
Defina seus títulos usandofancyhdr
, e você pode incluirifoddpage
para ver se você está em uma página ímpar ou par (chamada runningheads
abaixo).
\documentclass{article}
\usepackage{lipsum}
\title{\bfseries THE TITLE}
\author{FIRST AUTHOR\footnote{\texttt{[email protected]} Address}
\and SECOND AUTHOR\footnote{second author address}
\and THIRD AUTHOR\footnote{third author address}}
\date{~}
\usepackage{fancyhdr,ifoddpage}
\fancypagestyle{runningheads}{%
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule
%\renewcommand{\footrulewidth}{0pt}% Remove footer rule (default)
\fancyhead[L]{% Left header
\checkoddpage% Update \ifoddpage
\ifoddpage
F.~Author, S.~Author, T.~Author% Odd pages
\else
The short title% Even pages
\fi
}%
\fancyhead[R]{\thepage}% Right header
}
\pagestyle{runningheads}
\begin{document}
\maketitle
\lipsum
\lipsum
\end{document}
Responder2
Aqui está uma versão simplificada da solução de Werner, usando as opções fancyhdr
E
and O
em vez de \ifoddpage
. Além disso, não define um novo estilo de página, pois isso não é necessário neste exemplo.
\documentclass{article}
\usepackage{lipsum}
\title{\bfseries THE TITLE}
\author{FIRST AUTHOR\footnote{\texttt{[email protected]} Address}
\and SECOND AUTHOR\footnote{second author address}
\and THIRD AUTHOR\footnote{third author address}}
\date{~}
\usepackage[twoside]{fancyhdr}
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule
%\renewcommand{\footrulewidth}{0pt}% Remove footer rule (default)
\fancyhead[LO]{F.~Author, S.~Author, T.~Author} % Left header
\fancyhead[LE]{The short title} % Left header
\fancyhead[R]{\thepage}% Right header
\pagestyle{fancy}
\begin{document}
\maketitle
\lipsum
\lipsum
\end{document}