Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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

2 Answers 2

up vote 11 down vote accepted

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}
\lhead{M Python}
\rhead{Owl stretching time}
\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
\lhead{\runauthor}
\rhead{\runtitle}
\begin{document}
\maketitle
abc
\newpage
def
\newpage
\end{document}
share|improve this answer
    
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
1  
@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} 
% Headers
\usepackage{fancyhdr}
\pagestyle{fancy}
\thispagestyle{empty}
\fancyhead[LO]{My Running Title for Header}
\fancyhead[RE]{2013 Firstauthor and Secondauthor}
\begin{document}
\linenumbers
\lipsum[1-20]
\end{document}

This is just an expansion on the nice answers already shown here. And it works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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