Skip to content

大表格用页面横置,landscape后的页眉页脚没有自动转置如何解决? #875

Answered by LogCreative
linelee02 asked this question in 提问
Discussion options

You must be logged in to vote

如果页眉页脚不转置,可以参见 #779 。页眉页脚转置只是方便电子版,印刷时可能会带来麻烦,慎重使用。

参考 TeX.SX 上的回答,并结合默认的 geometry 配置,

\geometry{%
paper = a4paper,
top = 3.5cm,
bottom = 4.0cm,
left = 3.3cm,
right = 2.8cm,
headheight = 1.0cm,
headsep = 0.5cm,
}

可以给出一个临时的解决方法:

导言区添加

% \usepackage{etoolbox}
\makeatletter
\def\ifGm@preamble#1{\@firstofone}
\appto\restoregeometry{%
  \pdfpagewidth=\paperwidth
  \pdfpageheight=\paperheight
  \headwidth=\textwidth}
\apptocmd\newgeometry{%
  \pdfpagewidth=\paperwidth
  \pdfpageheight=\paperheight
  \headwidth=\textwidth}{}{}
\makeatother

正文需要横置的地方:

\…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by linelee02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
提问
Labels
None yet
2 participants