# How to add running title and author

My question is this: how can I add the co-called "running" title and author name on the top of each page? This feature is often used in journals so that the short running title is shown on the top of odd pages and the running author name is shown on the even pages.

In journal style files they usually provice the \titlerunning and \authorrunning commands to do it quickly, but how can I add them myself?

And also it would be very good (almost necessary) to add a line separating this running title of the rest of a page.

-
Is this for an article submission, or for personal use? If it's the former, they probably have specifications/requirements you have to adhere to. –  Werner Aug 22 '12 at 19:23
@Werner : Currently I need it for my personal use. When I submit to journal, I use the functions and style they provide, of course. –  v_2e Aug 22 '12 at 20:00

Try the fancyhdr package. The simplest approach is to set the headings manually.

\documentclass{article}
\title{Owl stretching time}
\author{M Python}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
\maketitle
abc
\newpage
def
\newpage
\end{document}


Using the arguments given to \author and \title is slightly more difficult, because these are cleared when \maketitle is executed. However, you can make copies using \let.

\documentclass{article}
\title{Owl stretching time}
\author{M Python}
\usepackage{fancyhdr}
\pagestyle{fancy}
\makeatletter
\let\runauthor\@author
\let\runtitle\@title
\makeatother
\begin{document}
\maketitle
abc
\newpage
def
\newpage
\end{document}

-
Thanks! It helps somewhat. I obtain a running author and title (with a nice line separating them from the rest of a page), but how do I make the title appear on the odd pages only and the author - on the even pages only? –  v_2e Aug 22 '12 at 19:58
@v_2e: If you're using twoside, you can specify \fancyhead[O]{...} for Odd-side headings, and \fancyhead[E]{...} for Even. Additional identifiers like L and R to denote the Left or Right side of the page. –  Werner Aug 22 '12 at 20:03
Well, thanks a lot! I did \fancyhead[LO]{Running title} and \fancyhead[RE]{Running author} in combination with twoside document class option, and it did exactly what I needed! :) –  v_2e Aug 22 '12 at 20:11

I had to piece together different parts of these answers to get what I needed. Two-sided, two-column, alternating left and right headers, with no header on the first page. And two-sided line numbers. You can insert a title however you want later, but the idea is that you won't want a header over your title.

\documentclass[twocolumn,twoside]{article}
% Line numbers package
\usepackage[switch,columnwise]{lineno}
% Creates example text
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}
\thispagestyle{empty}