4

I encountered a strange behavior of the command \newgeometry when using the crop package. After the first call of \newgeometry the centering of the page layout is lost and also can not be restored by calling \restoregeometry.

What should I do in order to avoid the loss of the centering?

Some pictures so you can see what I'm talking about (marked the physical margins with a thin red line):

page 1 page 2 page 3

MWE creating the pages shown above:

\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
    Add \makeatletter\CROP@center\makeatother after every change of geometry. – Ulrike Fischer Jun 12 '13 at 7:53
  • That worked, I think it should be implemented in the next release of geometry. Can you post your comment as an answer, so I can accept it? – MrD Jun 12 '13 at 12:14
6

Add \makeatletter\CROP@center\makeatother after every change of geometry.

  • It recenters the page on the new geometry. – MrD Jun 13 '13 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.