我当前的代码如下。我希望此横向文档中的页眉仅出现在第一页上,而不出现在任何后续页面上。此外,我想消除在后续页面上隐藏页眉时出现的大间隙。因此,我目前所做的是在第一页之后结束多列,然后定义一个适用于后续页面的新几何图形。这有一个缺点,我必须手动填充第一页,然后应用结束多列和新几何图形。总的来说,这似乎是一个黑客解决方案。
\documentclass[11pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{multicol}
\usepackage[usegeometry]{typearea}% before geometry!
\usepackage{geometry}
\usepackage{hanging}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand*{\uselandscape}{%
\clearpage
\KOMAoptions{paper=landscape,DIV=current}%switch to landscape
\newgeometry{% geometry settings for landscape
left=0.3in, right=0.3in, top=0.9in, bottom=0.8in,headheight=23pt
}%
}
\pagestyle{plain}
\cfoot{\thepage}
\fancypagestyle{firstpage}
{
\fancyhead[L]{Header\\Header 2 (last updated \today)}
}
\begin{document}
\thispagestyle{firstpage}
\uselandscape
\begin{multicols*}{3}
\section{Preferences and Choice}
\hangpara{1em}{1}\textbf{Rational preference relation} the preference relation $\succsim$ is rational iff it satisfies
\begin{enumerate}
\item Completeness: $\forall x,y, x\succsim y$ or $y \succsim x$
\item Transitivity: $\forall x,y,z, x\succsim y$ and $y \succsim z \implies x\succsim z$
\end{enumerate}
If $\succsim$ is rational, then
\begin{enumerate}
\item $\succ$ is both irreflexive ($x\succ x$ never holds) and transitive (if $x\succ y$ and $y\succ z$ then $x\succ z$)
\item $\forall x,y,z, x\succsim y$ and $y \succsim z \implies x\succsim z$
\item if $x\succ y \succsim z,$ then $x\succ z$
\end{enumerate}
\end{multicols*} % end multicols after first page to define newgeometry for all subsequent pages
\newgeometry{% newgeometry settings for subsequent pages: top margin 0.1in and no header
left=0.3in, right=0.3in, top=0.1in, bottom=0.7in,headheight=0pt,includehead
}%
\begin{multicols*}{3}
\hangpara{1em}{1}\textbf{An Unnumbered Paragraph} aaa
\end{multicols*}
\end{document}
答案1
对我来说,更简单的代码就有用。
\documentclass[11pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{multicol}
\usepackage[usegeometry]{typearea}% before geometry!
\usepackage{geometry}
\usepackage{hanging}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand*{\uselandscape}{%
\clearpage
\KOMAoptions{paper=landscape,DIV=current}%switch to landscape
\newgeometry{% geometry settings for landscape
left=0.3in, right=0.3in, top=0.9in, bottom=0.8in,headheight=23pt
}%
}
\pagestyle{plain}
\cfoot{\thepage}
\fancypagestyle{firstpage}
{
\fancyhead[L]{Header\\Header 2 (last updated \today)}
}
\begin{document}
\thispagestyle{firstpage}
\uselandscape
\begin{multicols*}{3}
\section{Preferences and Choice}
\hangpara{1em}{1}\textbf{Rational preference relation} the preference relation $\succsim$ is rational iff it satisfies
\begin{enumerate}
\item Completeness: $\forall x,y, x\succsim y$ or $y \succsim x$
\item Transitivity: $\forall x,y,z, x\succsim y$ and $y \succsim z \implies x\succsim z$
\end{enumerate}
If $\succsim$ is rational, then
\begin{enumerate}
\item $\succ$ is both irreflexive ($x\succ x$ never holds) and transitive (if $x\succ y$ and $y\succ z$ then $x\succ z$)
\item $\forall x,y,z, x\succsim y$ and $y \succsim z \implies x\succsim z$
\item if $x\succ y \succsim z,$ then $x\succ z$
\end{enumerate}
%\end{multicols*} % end multicols after first page to define newgeometry for all subsequent pages
\newpage
\newgeometry{% newgeometry settings for subsequent pages: top margin 0.0in and no header
left=0.3in, right=0.3in, top=0.0in, bottom=0.7in,headheight=0pt,includehead
}%
%\begin{multicols*}{3}
\hangpara{1em}{1}\textbf{An Unnumbered Paragraph} aaa
\newpage
\hangpara{1em}{1}\textbf{Another Unnumbered Paragraph} bbb
\end{multicols*}
\end{document}