[Tex/LaTex] Same margins when specifying “twoside” in memoir

double-sidedmarginsmemoir

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?

Best Answer

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}
  \addtolength\@tempdima     {-\textwidth}
  \setlength\oddsidemargin   {.4\@tempdima}
  \addtolength\oddsidemargin {-1in}
  \setlength\marginparwidth  {.6\@tempdima}
  \addtolength\marginparwidth{-\marginparsep}
  \addtolength\marginparwidth{-0.4in}
\else
  \setlength\@tempdima       {\paperwidth}
  \addtolength\@tempdima     {-\textwidth}
  \setlength\oddsidemargin   {.5\@tempdima}
  \addtolength\oddsidemargin {-1in}
  \setlength\marginparwidth  {.5\@tempdima}
  \addtolength\marginparwidth{-\marginparsep}
  \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}
\addtolength\@tempdima     {-\textwidth}
\setlength\oddsidemargin   {.5\@tempdima}
\addtolength\oddsidemargin {-1in}
\setlength\marginparwidth  {.5\@tempdima}
\addtolength\marginparwidth{-\marginparsep}
\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.