I'm trying to figure out how to set up custom page layout in memoir. below is a page I set up in InDesign and transferred the dimensions into a minimal memoir document.
I just can't figure out why it's not working.
\documentclass{memoir}
\setstocksize{477pt}{315pt}
\settrimmedsize{477pt}{315pt}{*}
\settrims{0pt}{0pt}
\settypeblocksize{420pt}{252pt}
\setlrmargins{39pt}{24pt}
\setulmargins{30pt}{27pt}
\setheadfoot{10pt}{10pt}
\setheaderspaces{20pt}{10pt}
\checkandfixthelayout
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
here are the error messages:
./memtest:7: LaTeX Error: Missing \begin{document}. [\setlrmargins{3]
./memtest:9: Class memoir Error: The combination of argument values is ambiguous. [\setheadfoot]
./memtest:11: Paragraph ended before \setfillsize was complete. []
./memtest:11: Too many }'s. []
./memtest:13: Class memoir Error: \spinemargin (109.26999pt) and/or \textwidth (252.0pt) and/or \foremargin (164.02501pt) are too >large for \paperwidth (315.0pt) by 210.295pt. [\usepackage]>
./memtest:13: Class memoir Error: \headheight (420.0pt) and>/or \headsep (0.0pt) are too large for \uppermargin (0.0pt) by 420.0pt.> [>\usepackage]>
[Done!]
Best Answer
You are forgetting all of the
*
arguments, they are well described in the manual. For examplehas to have one
*
as the rest will then be calculated from it. You can use this to say that the width should be some ratio (e.g., the golden ratio) of the height.On the other hand the the combination of
\settypeblocksize
and say\setlrmargins
leaves you with two*
arguments for\setlrmargins
, because, you know the paperwidth and the text width, thus you can only set one of the spine or outer margin, the other will then be given.One problem is that users often forget to match the sizes for the headers and footers such that they fit within the spaces given,
memoir
does not auto calculate this (haven't found a algorithm for it).Here is a version of your code with the added
*
's. You will probably get somewarnings, these some from the fact that your headheight is too small for 10pt.