1

The case is simple: when I put \newgeometry{margin=0} or \pagestyle{empty} inside a custom environment, it doesn’t work (but it work outside).

So, with the following MWE:

\documentclass[a4paper,11pt,twoside]{book}
\usepackage[showframe]{geometry}
\usepackage{lipsum}

\begin{document}

\newgeometry{margin=0pt}
\pagestyle{empty}
\lipsum[4]

\end{document}

I get this rendering

Then, it work.

But, with this one, it totaly fail:

\documentclass[a4paper,11pt,twoside]{book}
\usepackage[showframe]{geometry}
\usepackage{lipsum}


\newenvironment{quatrieme}
{
  \newgeometry{margin=0pt}
  \pagestyle{empty}
}
{
}

\begin{document}

\begin{quatrieme}
    \lipsum[4]
\end{quatrieme}

\end{document}

As you see, both \newgeometry and \pagestyle don’t work correctly inside environment. So, how to force anyway a good behavior?

  • 2
    \newenvironment{quatrieme}{\clearpage\newgeometry{...}\pagestyle{...}}{\clearpage} – egreg Mar 24 at 10:21

Your Answer

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

Browse other questions tagged or ask your own question.