9

What technical reasons are behind this?

From manual of package geometry:

... paper size options (such as papersize, paper=a4paper and so forth), which can’t be changed with \newgeometry.

2
3

I thank @DavidCarlisle and @UlrikeFischer for the support in providing this answer

paperwidth and paperheight are LaTeX lenghts, which are then ultimately converted in eg pdftex into the lenghts pdfpagewidth and pdfpageheight using this snippet:

\ifGin@setpagesize
\ifx\paperwidth\@undefined\else
  \AtBeginDocument{%
% If a package has changed \mag, assume it knows what it is doing
% and leave page size alone
\ifnum\mag=\@m
  \@ifundefined{stockwidth}{%
  \@ifundefined{paperwidth}{%
  }{%
    \ifdim\paperwidth>0pt\relax
      \ifdim\paperheight>0pt\relax
        \pdfpagewidth=\paperwidth
        \pdfpageheight=\paperheight
      \fi
    \fi
  }%
}{%
  \ifdim\stockwidth>0pt\relax
    \ifdim\stockheight>0pt\relax
      \pdfpagewidth=\stockwidth
      \pdfpageheight=\stockheight
    \fi
  \fi
}%
\fi
}

The "LaTeX" counterparts are discarded after the document has started (meaning they are not meaningful anymore), while the pdf counterparts are the ones ultimately used for setting.

Geometry sets the pdf lengths also at the begin of the document, possibly to maintain compatibility with the dvips drivers (which do not support multiple page sizes), so it does not allow them to be reset during the document, thus discarding the paper resizing options

1
  • Imho the main reason is that with e.g. the dvips driver it simply doesn't work to have to different papersizes in the document. – Ulrike Fischer Jun 10 '17 at 15:55

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.