
Intento agregar un título breve en las páginas pares y un autor en la página impar de un 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 se puede observar, en la parte superior de las páginas pares (al igual que en las impares) se inserta el autor y no el título corto como quiero.
Realmente no sé cómo solucionarlo manteniendo el mismo diseño del documento (márgenes, ancho, largo, etc.) que para la article
clase.
Cualquier ayuda sería apreciada.
Respuesta1
Establece tus títulos usandofancyhdr
, y puedes incluirifoddpage
para ver si estás en una página par o impar (llamada runningheads
a continuación).
\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}
Respuesta2
Aquí hay una versión simplificada de la solución de Werner, usando fancyhdr
E
y O
opciones en lugar de \ifoddpage
. Además, no define un nuevo estilo de página, ya que no es necesario en este ejemplo.
\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}