TeX - LaTeX Asked by Eulerian on March 1, 2021
My current code is below. I want the header in this landscape document only on the first page, and not on any subsequent pages. Furthermore, I want to remove the big gap that happens when I suppress the header on subsequent pages. Thus, what I currently do, is end multicol after the first page, then define a newgeometry that applies to subsequent pages. This has the disadvantage, that I have to manually fill the first page, then apply the end multicol and newgeometry. Overall this seems like a hacky solution.
Does anyone have an idea how to make this code more elegant?
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]{HeaderHeader 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, xsuccsim y$ or $y succsim x$
item Transitivity: $forall x,y,z, xsuccsim y$ and $y succsim z implies xsuccsim z$
end{enumerate}
If $succsim$ is rational, then
begin{enumerate}
item $succ$ is both irreflexive ($xsucc x$ never holds) and transitive (if $xsucc y$ and $ysucc z$ then $xsucc z$)
item $forall x,y,z, xsuccsim y$ and $y succsim z implies xsuccsim z$
item if $xsucc y succsim z,$ then $xsucc 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}
A simpler code works for me.
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]{HeaderHeader 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, xsuccsim y$ or $y succsim x$
item Transitivity: $forall x,y,z, xsuccsim y$ and $y succsim z implies xsuccsim z$
end{enumerate}
If $succsim$ is rational, then
begin{enumerate}
item $succ$ is both irreflexive ($xsucc x$ never holds) and transitive (if $xsucc y$ and $ysucc z$ then $xsucc z$)
item $forall x,y,z, xsuccsim y$ and $y succsim z implies xsuccsim z$
item if $xsucc y succsim z,$ then $xsucc 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}
Answered by Simon Dispa on March 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP