How do I customize the size of the output pages in the memoir class
?
For example, how could I change the page size to 6x9
(while preserving the margin proportions and headers/footers I use) in the following MWE?
\documentclass[11pt,a4paper]{memoir}
% customize
\setstocksize{297mm}{210mm}
\settrimmedsize{\stockheight}{195mm}{*}
\settypeblocksize{671.6pt}{335.8pt}{*}
\setlrmargins{*}{*}{4}
\setulmargins{*}{*}{2}
\setmarginnotes{5mm}{45.23mm}{\onelineskip}
\setlength{\footskip}{3.0\baselineskip}
\checkandfixthelayout
% headers and footers
\nouppercaseheads
\makepagestyle{mystyle}
\setlength{\headwidth}{\dimexpr\textwidth+\marginparsep+\marginparwidth\relax}
\makerunningwidth{mystyle}{\headwidth}
\makeevenhead{mystyle}{\itshape\leftmark}{}{}
\makeoddhead{mystyle}{}{}{\itshape\leftmark}
\makeevenfoot{mystyle}{\thepage}{}{}
\makeoddfoot{mystyle}{}{}{\thepage}
\makepsmarks{mystyle}{\createmark{chapter}{left}{}{}{}}
\makeatletter
\makepsmarks{mystyle}{\createmark{chapter}{left}{shownumber}{\@chapapp\ }{:\ }}
\makeatother
\makepagestyle{plain}
\makerunningwidth{plain}{\headwidth}
\makeevenfoot{plain}{\thepage}{}{}
\makeoddfoot{plain}{}{}{\thepage}
\pagestyle{mystyle}
\begin{document}
Here is some text.
\end{document}
P.S. Currently, my document has \documentclass[11pt,a4paper]{memoir}
at the top–does this control the page size?
Best Answer
Since
memoir
provides its own set of page layout macros, it's best to use them rather than resort to something likegeometry
. Also, usinga4paper
followed\setstocksize{297mm}{210mm}
is superfluous, sincea4paper
has those dimensions exactly. In fact, if you choose the document class optiona4paper
withmemoir
, it executes\stockaiv
, which is defined asSo, either use
a4paper
or\setstocksize{297mm}{210mm}
, but not both.In order to reduce the page size from
297mm
x210mm
to9in
x6in
"while preserving the margin proportions and headers/footers", I would figure out the ratios between the two sizes knowing thatAs such, the following settings are used:
It kept the same proportions between the page size and the text block, but kept the trimming margins the same (
15mm
less than\stockwidth
). The original is shown on the left, while the new is shown on the right at the same resolution (for comparison purposes):