0

I follow a template for an academic journal. I would like to have in the even pages the name of the authors in the heading and in the odd page the title of the paper. My MWE is:

\documentclass[]{article}
\makeatletter\if@twocolumn\PassOptionsToPackage{switch}{lineno}\else\fi\makeatother


\usepackage{amsmath,amsfonts,amsbsy,amssymb,tabulary,graphicx,times,caption,fancyhdr}
\usepackage[utf8]{inputenc}
\usepackage[paperheight=10in,paperwidth=6.5in,margin=2cm,headsep=.5cm,top=2.5cm]{geometry}
\renewenvironment{abstract} {\vspace*{-1pc}\trivlist\item[]\leftskip\oupIndent\hrulefill\par\vskip4pt\noindent\textbf{\abstractname}\mbox{\null}\\}{\par\noindent\hrulefill\endtrivlist} 
\linespread{1.13} \date{}
\captionsetup[figure]{labelfont=sc,skip=1.4pt,aboveskip=1pc}
\captionsetup[table]{labelfont=sc,skip=1.4pt,labelsep=newline}


\makeatletter\def\oupIndent{1pt}
\def\author#1{\gdef\@author{\hskip-\dimexpr(\tabcolsep)\hskip\oupIndent\parbox{\dimexpr\textwidth-\oupIndent}{\centering\bfseries#1}}}
\def\title#1{\gdef\@title{\centering\bfseries\ifx\@articleType\@empty\else\@articleType\\\fi#1}}
\let\@articleType\@empty \def\articletype#1{\gdef\@articleType{{\normal\itshape#1}}}
\fancypagestyle{headings}
{\fancyhf{}\fancyhead[RO]{\RunningHead}\fancyhead[LE]{\thepage \,\ \textbullet \,\ \Running}}\pagestyle{headings}
\makeatother

\tolerance=400
\usepackage{url,multirow,morefloats,floatflt,cancel,tfrupee}
\makeatletter

\usepackage{lipsum}

\begin{document}


\title{Our paper}
\author{\textbf{\fontsize{14pt}{16.4pt}\selectfont{Auth1\textsuperscript{1,2}\textsuperscript{,*}, Auth2\textsuperscript{1}, and Auth3\textsuperscript{1}}}~\\\normalsize\normalfont 
~\\\textsuperscript{1}{Our Department \unskip, Our University \unskip, Our address \unskip, Our city\unskip, Postcode\unskip, Our country. 
    Tel.:~+11 1111111}
~\\\textsuperscript{2}{His School\unskip, His University\unskip, His address \unskip, His city \unskip, Country. 
    Tel.:~his number}~\\{\normalsize\normalfont *Corresponding E-mail: auth@email}~\\{\normalsize\normalfont  E-mails: email1 (auth1); email3 (auth3)}}
\def\RunningHead{{Our paper}}
\def\Running{{Auth1, Auth2, Auth3}}

\maketitle 

\section{Section1}
\lipsum
\section{Section2}
\lipsum

\end{document}

Apparently, I cannot obtain what I need. It seems that I can only have the same heading into all page.

Any help on how I can fix it? Thanks in advance

7
  • 3
    article is oneside by default, just there is no distinction between even and odd. Try adding the twoside class options to see the difference.
    – daleif
    Jun 24, 2019 at 12:41
  • @daleif. Thanks!
    – Dario
    Jun 24, 2019 at 12:52
  • @daleif Can you make this as answer? So others can know if they facing this kind of situation...
    – MadyYuvi
    Jun 24, 2019 at 13:00
  • @MadyYuvi done.
    – daleif
    Jun 24, 2019 at 13:04
  • @daleif Much thanks for this...
    – MadyYuvi
    Jun 24, 2019 at 13:05

1 Answer 1

3

Your setup for fancyhdr depends on having a distinction between odd and even pages. But the default in the article class is oneside aka all pages behaves as odd pages.

Add the twoside class option to see the difference.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .