# Same margins when specifying “twoside” in memoir?

I'm using the memoir document class with options openright and twoside. However, as the document will be printed on regular paper instead of being binded into a book, I wish the left and right margins to be the same (while still opening chapers and parts on odd-numbered pages).

How do I achieve this?

-

The easiest way is to set the horizontal margin ratio to 1:1 and let memoir recalculate and apply it:

\setlrmargins{*}{*}{1}
\checkandfixthelayout


The arguments to \setlrmargins are spine margin, fore-edge margin, and ratio, if you omit a value by writing just* it will be calculated.

If you don't like to use memoir commands the specify page dimensions, you can check the original code how margins are set depending on the twoside option. Originally it's:

\if@twoside
\setlength\@tempdima       {\paperwidth}
\setlength\oddsidemargin   {.4\@tempdima}
\setlength\marginparwidth  {.6\@tempdima}
\else
\setlength\@tempdima       {\paperwidth}
\setlength\oddsidemargin   {.5\@tempdima}
\setlength\marginparwidth  {.5\@tempdima}
\addtolength\marginparwidth{-0.8in} % don't know why this isn't .4
\fi


So, you could do the required part in your preamble:

\documentclass[openright,twoside]{memoir}
\usepackage[english]{babel}
\usepackage{blindtext}
\makeatletter
\setlength\@tempdima       {\paperwidth}
\setlength\oddsidemargin   {.5\@tempdima}
\setlength\marginparwidth  {.5\@tempdima}
\addtolength\marginparwidth{-0.8in} % don't know why this isn't .4
\setlength\evensidemargin\oddsidemargin
\makeatother
\begin{document}
\blindtext[15]
\chapter{test}
\end{document}


I additionally set \evensidemargin equal to \oddsidemargin. With this example you will see symmetric page layout, page 4 is empty and chapter 1 starts at page 5, which is odd.

-
It's not that I don't like to use memoir commands -- it's that I don't know what they are in the first place. =) Could you please extend your answer to include the code which produces the same result but uses only memoir commands? –  gablin Aug 12 '11 at 13:43
@gablin: Ok, I added the 2 commands to fix it by memoir macros. –  Stefan Kottwitz Aug 12 '11 at 14:48
That was much easier than what I had found. Thanks! –  gablin Aug 14 '11 at 18:32

Browsing through the manual for memoir, I actually found the code which does exactly what I want. In case anyone else encounters the same problem, I'll include the code here:

% Set margins to equal length
\newlength{\marginwidth}
\setlength{\marginwidth}{1.5in}
\setlrmarginsandblock{\marginwidth}{\marginwidth}{*} % Specify both margins
\setlrmarginsandblock{\marginwidth}{*}{1} % Specify spine & fore-edge/spine
% ratio
\setlrmarginsandblock{\marginwidth}{*}{*} % Specify spine (fore-edge = spine)
\setlrmarginsandblock{*}{\marginwidth}{1} % Specify fore-edge & spine/fore-edge
% ratio
\setlrmarginsandblock{*}{\marginwidth}{*} % Specify fore-edge
% (spine = fore-edge)
\checkandfixthelayout

-

I think a simpler solution is:

\documentclass{memoir}
%%% set up the recto page layout
\checkandfixthelayout %or perhaps \checkandfixthelayout[lines]
\setlength{\evensidemargin}{\oddsidemargin}% after \checkandfix......


Source: Pg. 25 of the Memoir documentclass manual (Side margin section).

-