![裁剪与(新)几何形状之间的干扰](https://linux22.com/image/270129/%E8%A3%81%E5%89%AA%E4%B8%8E%EF%BC%88%E6%96%B0%EF%BC%89%E5%87%A0%E4%BD%95%E5%BD%A2%E7%8A%B6%E4%B9%8B%E9%97%B4%E7%9A%84%E5%B9%B2%E6%89%B0.png)
\newgeometry
我在使用该包时遇到了命令的奇怪行为crop
。第一次调用后,\newgeometry
页面布局的居中丢失,并且无法通过调用恢复\restoregeometry
。
我应该怎么做才能避免失去定心?
一些图片可以让您明白我在说什么(用细红线标记物理边缘):
MWE 创建上面显示的页面:
\documentclass{scrbook}
% driver=none is recommended when using geometry and crop together
% geometry documentation - Known problems:
% With crop package and mag not equal 1000, center option of crop doesn't work well.
% Therefore I have added mag=1000 (although it should be the default value)
\usepackage[a4paper,twoside,showframe,driver=none,mag=1000]{geometry}
\usepackage[width=216truemm, height=303truemm, center, frame, noinfo]{crop}
\usepackage{blindtext}
\begin{document}
\blindtext
\newgeometry{showframe, margin=1cm, includefoot, includehead, mag=1000}
\blindtext
\restoregeometry
\blindtext
\end{document}
答案1
\makeatletter\CROP@center\makeatother
每次几何形状改变后添加。