# Memoir spinemargin+textwidth+foremargin too wide for pagewidth

I've been trying to learn the details of the memoir package due to its flexibility. However now that I've tried to emulate a paperback format I'm hitting an error which I don't understand where it's coming from.

For the following basic code:

 \documentclass[12pt]{memoir}

\setstocksize{171mm}{104mm}
\settrimmedsize{\stockheight}{\stockwidth}{*}
\settrims{0mm}{0mm}

\checkandfixthelayout

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lipsum}

\begin{document}

\lipsum[1-100]

\end{document}


I'm getting the following error:

\spinemargin (58.26999pt) and/or \textwidth (252.0pt) and/or \foremargin (87.215pt) are too large for \paperwidth (295.90866pt) by 101.57632pt.

I can understand that the problem is with the definition of the dimensions, but from the information in the memoir manual, defining the stock and trimmed size should have set the margins and textwidth to the correct values.

What am I doing wrong here?

I suggest that you read section 2.6 Putting it together in the manual. Note that the page layout is only automatic for the normal desktop publishing paper sizes of A4 and letterpaper. The following does pretty much what you are after. I have used the class option foolscapvopaper for a stock paper 6.75 by 4.25 inches (which is the size of several of my paperbacks) so no need to trim.

\documentclass[12pt,foolscapvopaper]{memoir}

\settypeblocksize{145mm}{84mm} % the typeblock
\setlrmargins{*}{*}{*}         % equal left & right margins
\setulmargins{*}{2}{*}         % bottommargin twice topmargin

• the page layout is only automatic for the normal desktop publishing paper sizes of A4 and letterpaper Okay, that explains a lot of my problems and wrong assumptions. Thanks, now it works perfectly and I'm adjusting it for my needs. Might I just ask you to edit \settypeblocksize to add the third {} argument and \setulmargins into {}{*}{2}. At least that way it will be correct for anyone that stumbles upon this afterwards. Thanks again. Nov 2, 2015 at 21:37