我遵循学术期刊的模板。我希望在偶数页的标题中显示作者姓名,在奇数页中显示论文标题。我的 MWE 是:
\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}
显然,我无法获得我需要的内容。看来我只能在所有页面中使用相同的标题。
有人能帮我解决吗?提前谢谢
答案1
fancyhdr 的设置取决于奇数页和偶数页之间的区别。但是 article 类中的默认设置是,oneside
所有页面都视为奇数页。
添加twoside
类选项来查看差异。