[Tex/LaTex] How to make a specific page size with memoir class

marginsmemoir

I'm having a really hard time getting my book to have the exact page and margin size configuration. My goal is to use the memoir class (already have a fairly complex document that it works well with) but I can't seem to get the margins to work properly.

Here is my sample document:

\documentclass[showtrims,statementpaper,10pt,twoside,onecolumn,openright,extrafontsizes]{memoir}
\usepackage{lipsum}

% PAPER SIZE
\settrimmedsize{7.875in}{4.875in}{*}
\setstocksize{7.875in}{4.875in}
%\settrimmedsize{\stockheight}{\stockwidth}{*}
\setlrmarginsandblock{5in}{.5in}{*}
\setulmarginsandblock{.5in}{1.5in}{*}

\begin{document}
\lipsum[1-12]
\end{document}

Here is a sketch of what I'm trying to achieve.

desired margins sketch

However, when I attempt to set the margins, my text block gets pushed half way off the page and it looks completely wrong. I assume I'm doing something silly and completely missing something simple, but I can't seem to wrap my heard around it. Here I've set the margins to .5in, and yet the text is off the page? I've played with the text block options too and can get the text back on the page, but the margins never put the space where I think it should.

Can anyone tell me what I need to change to get the desired layout in the sketch?

enter image description here

Best Answer

Without using canoniclayout

You can set everything using the built in memoir commands outlined in chapter 2 of the memoir manual.

Here's a layout matching your picture above:

\documentclass{memoir}
\usepackage{showframe}
\usepackage{lipsum}
\setstocksize{7.875in}{4.875in}
\settrimmedsize{7.875in}{4.875in}{*}
\setlrmarginsandblock{.625in}{.75in}{*}
\setulmarginsandblock{.625in}{1.25in}{*}
\checkandfixthelayout
\begin{document}
\lipsum[1-12]
\end{document}

You can alter the position of headers and footers using the commands in ยง2.5 of the memoir manual.


Original answer using canoniclayout

If you want to use canoniclayout, it seems pretty simply.

Try this:

\documentclass[showtrims]{memoir}
\usepackage{lipsum}
\setstocksize{9.875in}{6.875in}
\settrimmedsize{7.875in}{4.875in}{*}
\settrims{1in}{1in}
\setlrmarginsandblock{1in}{1in}{*}
\setulmarginsandblock{1in}{1in}{*}
\checkandfixthelayout
\usepackage{canoniclayout}
\begin{document}
\lipsum[1-12]
\end{document}

enter image description here