![我的 PDF 文件缺少页眉](https://linux22.com/image/442476/%E6%88%91%E7%9A%84%20PDF%20%E6%96%87%E4%BB%B6%E7%BC%BA%E5%B0%91%E9%A1%B5%E7%9C%89.png)
这是期刊模板的 Latex 代码。虽然期刊网站上的随附 PDF 在奇数页和偶数页中都显示了运行页眉,但当我执行同一个文件时,在偶数页中没有得到运行页眉。更具体地说,命令,
\afterpage{\rhead[]{\thepage} \chead[\small A.B. First and C.D.
Second Author]{\small Short title} \lhead[\thepage]{} }
似乎没有输出。我给几个人发了电子邮件,当他们在电脑上运行它时,输出似乎没问题。他们建议我更新我的 LaTeX 版本。我目前正在使用 Tex Live 版本 2021。我可能错过了一些显而易见的东西,但我已经卡了很长时间了。
\documentclass[10pt, a4paper,twoside]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{amsthm}
\usepackage{rotate}
\usepackage{graphicx}
%\usepackage{psfrag}
\usepackage[T1]{fontenc}
\usepackage{afterpage} %
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{remark}[theorem]{Remark}
\textheight185mm
\renewcommand{\thefootnote}{}
\def\t{\hspace{-6mm}{\bf .}\hspace{3mm}}
\def\bt{\hspace{-2mm}{\bf .}\hspace{2mm}}
\def\hs{\hspace*{0.56cm}}
\setlength{\oddsidemargin}{0pt} \setlength{\evensidemargin}{0pt}
\setlength{\hoffset}{-1in} \addtolength{\hoffset}{3.5cm}
\setlength{\textwidth}{12.5cm} \setlength{\voffset}{-1in}
\addtolength{\voffset}{3cm}
\setcounter{page}{1} %%%%%%%%%%%%%%%%% starting page
\fancyhead{} \fancyfoot{} \fancyhead[CO]{\small
Quasigroups~and~Related~Systems ~{\bf 30}~(2022), $xx - yy$} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\headrulewidth}{0.4pt}
\pagestyle{fancy}
\begin{document}
\afterpage{\rhead[]{\thepage} \chead[\small A.B. First and C.D. %%%%%%%%% complete
Second Author]{\small Short title} \lhead[\thepage]{} } %%%%%%%%% complete
\begin{center}
\vspace*{2pt}
{\Large \textbf{The full title of the paper}}\\[3mm]
{\Large\textbf{continue or delete this line}}\\[26pt]
{\large \textsf{\emph{Author(s) with the full first name }}}
\\[26pt]
\end{center}
\textbf{Abstract.} {\footnotesize We describe }
\footnote{\textsf{2010 Mathematics Subject Classification:} .....
}
\footnote{\textsf{Keywords:} .... }
\section*{\centerline{1. Introduction}}\setcounter{section}{1}
A groupoid is \emph{medial} if it satisfies the identity $wx\cdot
yz = wy\cdot xz$. A groupoid is \emph{trimedial} if every
subgroupoid generated by $3$ elements is medial.
In \cite{kepka1} it is proved that a quasigroup satisfying the
following three identities must be trimedial.
\begin{eqnarray}
xx\cdot yz &=& xy\cdot xz \\
yz\cdot xx &=& yx\cdot zx \\
(x\cdot xx)\cdot uv &=& xu \cdot (xx\cdot v)
\end{eqnarray}
\noindent The converse is trivial, and so these three identities
characterize trimedial quasigroups. Here, we show that, in fact,
(2) and (3) are sufficient to characterize this variety (as a
subvariety of the variety of quasigroups).
\section*{\centerline{2. Medial quasigroups}}\setcounter{section}{2}
\begin{theorem}\label{T1} Let $G$ be a quasigroup...
\end{theorem}
\begin{proof} If $G$ is a quasigroup...
\end{proof}
\begin{corollary} Let $G$ be a quasigroup...
\end{corollary}
\begin{remark} It is only an example. The
paper accepted for publication in our journal must be prepared in
Latex, Amstex or similar style preserving the general convention
presented in this form.
\end{remark}
\small
\begin{thebibliography}{20}
\bibitem{kepka1}
{\bf T. Kepka}, {\em Structure of triabelian quasigroups},
Comment. Math. Univ. Carolin. \textbf{17} (1976), no. $2$,
$229-240$.
\end{thebibliography}
\noindent
\footnotesize{Full address, for example \\
Faculty of Pure and Applied Mathematics\\
Wroclaw University of Sience and Technology\\
Wyb. Wyspianskiego 27 \\
50-370 Wroc{\l}aw\\
Poland\\
E-mail: abc.edu }
\newpage
xxx
\end{document}
答案1
在 \begin{document} 之前删除所有 h/f 配置并写入以下代码:
\fancypagestyle{fancy}{%
\fancyhead{}
\fancyfoot{}
\fancyhead[RO]{\thepage}
\fancyhead[CO]{\small Quasigroups~and~Related~Systems ~{\bfseries 30}~(2022), $xx - yy$}
\fancyhead[LE]{\thepage}
\fancyhead[CE]{\small A.B. First and C.D.Second Author}
\fancyhead[RE]{\small Short title}
\renewcommand{\headrulewidth}{0.4pt}
}
\pagestyle{fancy}
编辑:无论如何我都会添加整个 MWE
\documentclass[10pt, a4paper,twoside]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{amsthm}
\usepackage{rotate}
\usepackage{graphicx,lipsum}
%\usepackage{psfrag}
\usepackage[T1]{fontenc}
\usepackage{afterpage} %
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{remark}[theorem]{Remark}
\textheight185mm
\renewcommand{\thefootnote}{}
\def\t{\hspace{-6mm}{\bf .}\hspace{3mm}}
\def\bt{\hspace{-2mm}{\bf .}\hspace{2mm}}
\def\hs{\hspace*{0.56cm}}
\setlength{\oddsidemargin}{0pt} \setlength{\evensidemargin}{0pt}
\setlength{\hoffset}{-1in} \addtolength{\hoffset}{3.5cm}
\setlength{\textwidth}{12.5cm} \setlength{\voffset}{-1in}
\addtolength{\voffset}{3cm}
\setcounter{page}{1} %%%%%%%%%%%%%%%%% starting page
\fancypagestyle{fancy}{%
\fancyhead{}
\fancyfoot{}
\fancyhead[RO]{\thepage}
\fancyhead[CO]{\small Quasigroups~and~Related~Systems ~{\bfseries 30}~(2022), $xx - yy$}
\fancyhead[LE]{\thepage}
\fancyhead[CE]{\small A.B. First and C.D.Second Author}
\fancyhead[RE]{\small Short title}
\renewcommand{\headrulewidth}{0.4pt}
}
\pagestyle{fancy}
\begin{document}
\begin{center}
\vspace*{2pt}
{\Large \textbf{The full title of the paper}}\\[3mm]
{\Large\textbf{continue or delete this line}}\\[26pt]
{\large \textsf{\emph{Author(s) with the full first name }}}
\\[26pt]
\end{center}
\textbf{Abstract.} {\footnotesize We describe }
\footnote{\textsf{2010 Mathematics Subject Classification:} .....
}
\footnote{\textsf{Keywords:} .... }
\section*{\centerline{1. Introduction}}\setcounter{section}{1}
A groupoid is \emph{medial} if it satisfies the identity $wx\cdot
yz = wy\cdot xz$. A groupoid is \emph{trimedial} if every
subgroupoid generated by $3$ elements is medial.
In \cite{kepka1} it is proved that a quasigroup satisfying the
following three identities must be trimedial.
\begin{eqnarray}
xx\cdot yz &=& xy\cdot xz \\
yz\cdot xx &=& yx\cdot zx \\
(x\cdot xx)\cdot uv &=& xu \cdot (xx\cdot v)
\end{eqnarray}
\noindent The converse is trivial, and so these three identities
characterize trimedial quasigroups. Here, we show that, in fact,
(2) and (3) are sufficient to characterize this variety (as a
subvariety of the variety of quasigroups).
\section*{\centerline{2. Medial quasigroups}}\setcounter{section}{2}
\begin{theorem}\label{T1} Let $G$ be a quasigroup...
\end{theorem}
\begin{proof} If $G$ is a quasigroup...
\end{proof}
\begin{corollary} Let $G$ be a quasigroup...
\end{corollary}
\begin{remark} It is only an example. The
paper accepted for publication in our journal must be prepared in
Latex, Amstex or similar style preserving the general convention
presented in this form.
\end{remark}
\small
\begin{thebibliography}{20}
\bibitem{kepka1}
{\bf T. Kepka}, {\em Structure of triabelian quasigroups},
Comment. Math. Univ. Carolin. \textbf{17} (1976), no. $2$,
$229-240$.
\end{thebibliography}
\noindent
\footnotesize{Full address, for example \\
Faculty of Pure and Applied Mathematics\\
Wroclaw University of Sience and Technology\\
Wyb. Wyspianskiego 27 \\
50-370 Wroc{\l}aw\\
Poland\\
E-mail: abc.edu }
\newpage
\lipsum[1-25]
\end{document}