The Swedish state paper format S5 has dimensions of 165 x 242 mm. It does not exist as a preset in the geometry package, neither s5paper or statsformat are acceptable options.
[Tex/LaTex] How to produce a pdf in S5 or statsformat
geometrypaper-size
Related Solutions
In the terminology of the geometry
package, the paper<*>
parameters refer to the physical size of the sheets of paper the document will be printed on. The layout<*>
parameters, by contrast, refer to the logical size of the "paper", which will (one hopes) be no larger than the physical size of the sheet of paper. (Put differently, with regard to paper
and layout
, your terminology and that of the geometry
package are exactly reversed...)
You will need to use the parameters layoutvoffset
and layouthoffset
to indicate where on the physical page the logical page is supposed to be placed. Assuming that the logical page should be centered on the physical page, and given that the differences between the physical and logical dimensions are 100mm and 80mm, respectively, the values of layoutvoffset
and layouthoffset
should be 50mm and 40mm.
By the way, if the logical page is supposed to be exactly centered on the physical page, you needn't load the crop
package; specifying the option showcrop=true
(as you already do) suffices.
Addendum, to address the follow-up request to make the text block margins be zero: To make the text block occupy the entire logical layout, while still showing the header and footer lines, you need to specify the options margin=0pt
and includeheadfoot
when loading the geometry package.
\documentclass{book}
\usepackage{lipsum}
\usepackage[ paperheight =297mm,paperwidth =210mm, % or: "paper=a4paper"
layoutheight =197mm,layoutwidth =130mm,
layoutvoffset= 50mm,layouthoffset= 40mm,
margin=0pt, includeheadfoot,
showframe=true, showcrop=true]{geometry}
%% \usepackage[a4,center]{crop} %% not needed if logical page is centered on physical page
\begin{document}
\chapter{In the Beginning}
\lipsum
\end{document}
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
Best Answer
The answer is to manually specify the paper size to geometry: