Does anyone know how to change these length parameters in the middle of a latex document?
I would like to define a page size for a single page (possibly two or three). I tried v5.3 of the geometry package, which just added some new features; like \newgeometry. Unfortunately \newgeometry cannot be used to redefine \paperheight and \paperwidth.
Any help would be very appreciated.
You can't do this in DVI mode: the DVI format specifies the coordinate bounds in the preamble (maxv
, maxh
) and has no opcodes to change the values once set. DVI doesn't really have a notion of page dimension anyway; cf. my answer to the dvi generation: no bounding box question. You might be able to mess about with Postscript specials and do this that way: I don't know how.
In PDF mode (Pdftex, Xetex (and Luatex with pdf
prefix removed from macro names)) you can change PDF dimensions:
\documentclass{article} \begin{document} Normal page \eject \pdfpagewidth=3in \pdfpageheight=10in Tall page \eject \pdfpagewidth=10in \pdfpageheight=3in Wide page \end{document}
It's best to issue these dimension changes before anything has been typeset on the page, since these dimensions affect how Tex lays out content. Also note that your choice of margins, etc., should be guided by page dimensions and need to be reset accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With