我在 StackExchange 上找到了用于定义 A3Landscape 环境的代码https://tex.stackexchange.com/a/431435/278762:
\makeatletter
% like \newgeometry, but also allows change of landscape/portrait
% and paper size to be used with caution!
\newcommand{\newgeometryfull}[1]{%
\clearpage
\Gm@restore@org
\Gm@initnewgm
% \Gm@newgmtrue
\setkeys{Gm}{#1}%
% \Gm@newgmfalse
\Gm@process
\ifnum\mag=\@m\else\Gm@magtooffset\fi
\Gm@changelayout
\Gm@showparams{newgeometry}}%
\makeatother
%% Allow A3 sheets - - New environment
\newenvironment{a3pageLandscape}{%
\newgeometryfull{a3paper,landscape=true,top=2cm, bottom=2cm, left=1.5cm, right=1.5cm}
% set the correct dimension for the PDF viewer
\pdfpageheight=\paperheight
\pdfpagewidth=\paperwidth
\headwidth=\textwidth
}{%
\restoregeometry
% set the correct dimension for the PDF viewer
\pdfpageheight=\paperheight
\pdfpagewidth=\paperwidth
}
使用此a3pageLandscape
环境会产生以下输出:
效果很好。
现在,我想知道是否可以将环境从 A3Landscape 更改为 A3Portrait。所以我将代码从 更改为landscape=true
。landscape=false
在此处查看完整的新环境:
%% Allow A3 sheets - - New environment
\newenvironment{a3pagePortrait}{%
\newgeometryfull{a3paper,landscape=false,top=2cm, bottom=2cm, left=1.5cm, right=1.5cm}
% set the correct dimension for the PDF viewer
\pdfpageheight=\paperheight
\pdfpagewidth=\paperwidth
\headwidth=\textwidth
}{%
\restoregeometry
% set the correct dimension for the PDF viewer
\pdfpageheight=\paperheight
\pdfpagewidth=\paperwidth
}
使用a3pagePortrait
环境产生以下输出:
问题:有人知道为什么我的页脚a3pagePortrait
在下一页上使用环境时消失了吗?