# Problems with page layout dimensions in the memoir class

Recently, when defining the layout geometry for my doctoral thesis, I faced the following problem: the dimensions informed by me, which I will call virtual dimensions, do not correspond to the dimensions of the paper, which I will call the real dimension.

In the composition of my thesis, I opted for the memoir class, because I consider it to be a class composed of many resources and, for this very reason, very versatile. Reading the class manual, I found on page xxxv, where the author defines the terminology to be used, that the conversions used by the class are 72.27 pt for each 1 in, which corresponds to 25.4 mm. However, when I bring this to the real paper, (that is, after printing the data on the sheet of paper) and checking the dimensions with a ruler, I see that these values ​​do not match.

My intention was always to use the A4 paper format and, for this reason, I chose the class option a4paper, but when I found the conflict between the virtual and real dimensions, I decided to use the internal configuration commands and typed the following code:

\documentclass[12pt,a4paper,extrafontsizes,showtrims]{memoir}
\usepackage[english,brazil]{babel}
\usepackage{lipsum}

\setstocksize{297mm}{210mm}%
\settrimmedsize{\stockheight}{\stockwidth}{*}
\settrims{0mm}{0mm}
\setlrmarginsandblock{30mm}{20mm}{*}%
\setulmarginsandblock{30mm}{20mm}{*}%
\setmarginnotes{2.0mm}{16mm}{5.0mm} \setcolsepandrule{3.5mm}{0.15mm}
\setfootins{\bigskipamount}{\bigskipamount}
\checkandfixthelayout[fixed]

\begin{document}
\lipsum
\end{document}


After printing on the sheet of paper, I took some measures and noted them in the following table:

In the first column, I wrote down the measured items. In the second and third columns, I annotated the real values (which I would like to obtain) and virtual values (values ​​truly obtained despite the values informed in the code), respectively. In the fourth column, I annotated the ratio between the real and virtual values, and in the fifth column, I annotated the corrected value (the value entered the code multiplied by the correction factor).

In the face of all this exhaustive narrative, what I would like to know is whether anyone has encountered this problem before, and how it could be resolved.

• Please explain exactly how you print (which program), dome programmes actually scale down the contents even if you font ask for it. – daleif Jul 22 at 15:51
• @daleif , I have an EPSON printer model L4160. It is configured to print on A4 size paper. I usually use Sumatra pdf or acrobat adobe Pro DC. – lucenalex Jul 22 at 16:16
• You should probably double check that the fit to size (or what ever it is called) is unchecked. Also it ts not well defined what you're actually measuring. Just to rule out printing defects I tend to use tikz overlays if I'm worried something is wrong. If it fits there I know the problem is elsewhere – daleif Jul 22 at 16:34
• Okay, I'll try to be more didactic. In the code, I inform the size values ​​that I intend to obtain in my page layout. But when I print my document, those dimensions are not verified. How do I see this? I take a ruler and do the measurements manually. Just for the record, my stock paper actually has dimensions 297mm by 210mm (A4 paper), but when my document has printed the result on the stock is 287mm by 204mm as if I was setting the trimming size. To see this, I activate the showtrims class option to mark the corners of the printable area. – lucenalex Jul 22 at 17:02
• Given the fact that the trimmarks sits directly in the corners indicate that the way you print is faulty. As I mention above we see this a lot due to faulty settings in the software you use to print. If or without the first three \set... lines the document is the correct size. BTW: your table does not make sense, the first two are the paper width, not the text width. The trimmarks marks the paper size. – daleif Jul 22 at 17:24

I believe that your problem is with your printing process, not the memoir class. I slightly extended your MWE (as below), used pdflatex and evince to display the resulting PDF and then printed on my EPSON WorkForce WF-2750 printer. The printed output matched the specifications in the MWE code. Note that after processing the MWE the terminal output lists the page layout dimensions.

% mempageprob.tex  SE 554615
\documentclass[12pt,a4paper,extrafontsizes,showtrims]{memoir}
\usepackage[english,brazil]{babel}
\usepackage{lipsum}
\usepackage{layouts}

\setstocksize{297mm}{210mm}%
\settrimmedsize{\stockheight}{\stockwidth}{*}
\settrims{0mm}{0mm}
\setlrmarginsandblock{30mm}{20mm}{*}%
\setulmarginsandblock{30mm}{20mm}{*}%
\setmarginnotes{2.0mm}{16mm}{5.0mm} \setcolsepandrule{3.5mm}{0.15mm}
\setfootins{\bigskipamount}{\bigskipamount}
\checkandfixthelayout[fixed]

\begin{document}

\begin{figure}
\currentpage
\oddpagelayouttrue
\pagedesign
\caption{Odd page layout for this document}
\end{figure}

\rule{15cm}{5mm}

\lipsum
\end{document}



I included @daleif's suggestion of a 15cm rule, which printed at 15cm, and used the layouts package to show and list the page layout scheme and dimensions.

My printed result was exactly what you had asked memoir to provide.