3

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

David Purton
  • 25,884
luisdent
  • 43
  • 6
  • If you want to set pages manually, use geometry (assuming it is compatible with memoir). – John Kormylo Nov 06 '17 at 14:21
  • https://tex.stackexchange.com/questions/288716 (memoir and geometry seem to work together well) – Dr. Manuel Kuehner Nov 06 '17 at 16:21
  • I believe that the memoir class enables any page layout that you desire; however you have to tell it what you want. It's not clear to me what it is that you want. Try calculating yourself what the margins etc., are that you want and then use memoir's capabilities. – Peter Wilson Nov 06 '17 at 19:26
  • I was trying to use canoniclayout to get golden ratio margins. The main thing is that there is no 7.875 by 4.875 paper size as a "size". Therefore, I haven't been able to get the canoniclayout to work. It seems to only work if you have a "size" designated in the actual document class. I'd set my own, but I'm not sure how to calculate what the margins should be, and what variables or properties to use. My book paper is 7.875 by 4.875. the actual paper. is that "trim" in latex? if so, what is "page size"? what's the best documentation to read? memoir didn't help... – luisdent Nov 07 '17 at 03:15
  • updated the question. hopefully it's more clear... – luisdent Nov 08 '17 at 01:59
  • Well you have specified a 5in margin which seems a little large... Also, then you need \checkandfixthelayout after setting up dimensions in memoir. Then after the call to \checkandfixthelayout insert \usepackage{canoniclayout}. Does that give you what you want? – David Purton Nov 08 '17 at 03:25
  • Now see, if you were using the novel document class, you would write SetTrimSize{4.875in}{7.875in} and SetMargins{.625in}{.75in}{1.25in}{.625in} (top, outside, bottom, inside) where I assume that the .75in is the outside. But you cannot make marginal notes. Setting header/footer is similarly simple. –  Nov 10 '17 at 04:52
  • As mentioned you are missing \checkandfixthelayout, look in the memoir manual to see what this actually does and the algorithms that it supports. Note that by default you do not get the exact text height your are asking, the height is rounded to make it match an integral number of text lines. – daleif Nov 10 '17 at 08:45
  • Related: https://tex.stackexchange.com/q/359428/8666 – 0 _ Dec 20 '17 at 00:20

1 Answers1

4

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

David Purton
  • 25,884
  • i have that working now, and it's a bit more sense to me, however, if I want to remove everything and just have the page size be trim size it gets messed up. the text block changes and shifts off the page again unless i use canonical. And if I change the stocksize, without using canonical, to anything bigger than the trim area, the trim area is not centered but top edge aligned. is there a way to center it like the image above without using canonical? so i just completely manually adjust the margins but not have it shift off the page? i feel like i'm still not understanding something... – luisdent Nov 10 '17 at 03:00
  • I found out the commenting out the marginnote package fixed some of the layout issues. I was using margin notes but have them commented out for now. So it seems like most things are working now. I just would like to have the page size be the trim size. Is that possible? Making them the same or removing the trims or vice versa doesn't work, the layout breaks... – luisdent Nov 10 '17 at 03:21
  • Yes, you can set everything using memoir commands providing you finish with \checkandfixthelayout. I'll update my answer to show. – David Purton Nov 10 '17 at 03:27
  • I figured it out just now actually. I didn't realize the \settrims was just an offset and that the trims weren't centered in any way other than that. By using the same values for \settrimmedsize and \setstocksize and then setting the \settrims to be zero, the page then displays properly. Pardon my ignorance. But your answer David was the stuff I was looking for. – luisdent Nov 10 '17 at 03:39