# Wrong margins on even pages using Memoir

I'm trying to customize the textblock size in a Memoir document, however, both \settextblocksize and a simple \setlength{\textwidth}, \setlength{\textheight} cause wrong margins on even pages.

A minimal working example is:

\documentclass[a4paper,11pt]{memoir}

\usepackage{showframe}
\usepackage{blindtext}

\setlength{\textheight}{23.45cm}
\setlength{\textwidth}{11.85cm}

\begin{document}

\Blindtext

\Blindtext

\end{document}


Output for second and third page:

How to fix this?

The magic command \checkandfixthelayout does not help with this particular problem.

• Often, memoir users decide on margins and let the typeblock set itself. Commands used include \setstocksize, \settrimmedsize, \setlrmarginsandblock, and \setulmarginsandblock. These are in sections 2.3 and 2.4 of the memoir manual. – Mike Renfro Jul 22 '15 at 15:14

As Mike mention, you are messing with the text width but there are many other parameters that control the layout.

This works

\settypeblocksize{23.45cm}{11.85cm}*
\setlrmargins{*}{*}{0.75}
\checkandfixthelayout


Note that if you leave out the \setlrmargins then you get what you showed.

• Thank you for the answer and the explanation, this solves my problem! I actually expected Memoir to recalculate the margins automatically when using its \settypeblocksize command. – Andreas Stöckel Jul 22 '15 at 19:14
• How would it know the margins you want? – daleif Jul 22 '15 at 19:17