1

When I execute the following command, it works:

\makeatletter\CROP@center\makeatother 

But, when I include this command in a \def, as shown below, it no longer works:

\def\fixCroppingBugCausedByChangeOfGeometry
{\makeatletter\CROP@center\makeatother}

How to fix that?

Here is my MWE.

\documentclass{article}

\usepackage{geometry}

\usepackage[ width=25truecm, height=32truecm, cam, pdftex, center ]{crop}

\def\fixCroppingBugCausedByChangeOfGeometry {\makeatletter\CROP@center\makeatother}

\begin{document}

Page 1

\newpage \newgeometry{left = 5cm, right = 5cm} \fixCroppingBugCausedByChangeOfGeometry %\makeatletter\CROP@center\makeatother

Page 2

\newpage \restoregeometry \fixCroppingBugCausedByChangeOfGeometry %\makeatletter\CROP@center\makeatother

Page 3

\end{document}


PS: I have to do that because I want to execute the command \CROP@center only if the crop package is loaded.

Colas
  • 6,772
  • 4
  • 46
  • 96
  • 4
    the \makeatletter must be outside of the definition \makeatletter\def\fixCroppingBugCausedByChangeOfGeometry{\CROP@center}\makeatother – Ulrike Fischer Feb 26 '23 at 12:25
  • As a newbie I had a similar problem ;-) https://tex.stackexchange.com/q/333839/82917 – campa Feb 26 '23 at 13:44

0 Answers0