I am looking to create a command that adjusts my page layout, here is a sample:
\newcommand{\margin}{
\pdfpageheight 297mm
\pdfpagewidth 210mm
\pagebreak
\newgeometry{lmargin=31.5mm, rmargin=31.5mm, includemp, marginparsep=5mm, marginparwidth=52mm}
\setlength{\headwidth}{147mm}}
It basically just adjusts the margins to have a 52mm margin on the right hand side, and then I have other layouts too, which I all call with different commands, such as \margin
, \nomargin
, \marginlandscape
, and this brings me to my problem.
Ideally, I would want to only have to use one command, such as
\mypagestyle{margin}
\mypagestyle{nomarginlandscape}
but I have no idea how to create such a command, I've tried to do it myself and I've looked all over the place, but can find no answers. So, how do I code a newcommand
that would give me the desired results?