3

I am trying to get equal horizontal margins in a memoir class document. But I can't get the margins to be exactly equal, and this problem doesn't seem to be limited to the memoir class. All of the following MWEs have the same problem (described in more detail below).

[1] memoir class using memoir's layout macros

\documentclass[letterpaper,oneside,openany]{memoir}
\setlrmarginsandblock{1.25in}{1.25in}{*} 
\setulmarginsandblock{1in}{1in}{*}
\checkandfixthelayout

\usepackage{lipsum}
\usepackage{showframe}
\begin{document}
\lipsum[1-20]
\end{document}

[2] memoir class using geometry's layout macros

\documentclass{memoir}
\usepackage[paper=letterpaper,%
  hmargin=1.25in,%
  vmargin=1.0in,
  showframe]{geometry}
\usepackage{lipsum}

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

[3] article class using geometry's layout macros

\documentclass{article}
\usepackage[paper=letterpaper,%
  hmargin=1.25in,%
  vmargin=1.0in,
  showframe]{geometry}
\usepackage{lipsum}

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

When I print the pages (on US Letter size paper) and check margins with a ruler, they are not exactly 1.25 inches. On one page, the left margin is a little more than 1.25 inches (~1/16 - 1/32 of an inch) and the right margin is a little less than 1.25 inches. On the next page, the reverse is true (left margin is a little less, right margin a little more). And this alternating pattern continues throughout the document. These unequal margins also cause another problem: Page numbers in the footer which should be horizontally centered on the page are not actually centered. They move a little bit to the left or right on alternating pages. In the memoir class, I generate page numbers with a pagestyle:

\makepagestyle{haspagenum}
  \makeevenfoot{haspagenum}{}{\thepage}{}
  \makeoddfoot{haspagenum}{}{\thepage}{}

This behavior is not caused by the printer. It's in the actual pdf. (Someone else with a copy of the pdf was the first to notice it.)

I am using latexmk and the following command to make the pdfs:

latexmk -xelatex -pdf filename.tex

But the problem remains when I use pdftex instead of xetex to make the pdf:

latexmk -pdf filename.tex

And I am (still) using TeXLive 2013 as the TeX distribution.

  • 1
    here's a "minority report". i processed the article version to a .dvi file, distilled that with acrobat, and printed it. i took page 1, rotated it 180 degrees, and overlaid it on page 2 on a light table. the margins on both sides are identical. i repeated this process (omitting geometry} using amsart, which automatically centers pages on letter paper, and got identical margins. finally, i reprocessed the article version with pdflatex, and again, got an identical result. when you printed your test, were you using the same printer as the person who called this to your attention? – barbara beeton Sep 13 '14 at 20:40
  • @barbarabeeton, two people (including myself) have seen the problem, and we're not using the same printers. But the problem (when the shift is about 1/16 inch) is visible in the PDF too (at least when using memoir). Note: The margins might be identical for you, but they could also be identically incorrect. That is, in the article version made with pdflatex, it's possible that the margins on both pages are shifted in the same direction rather than alternating on every other page. Any interest in checking with a ruler? – GirlofVito Sep 13 '14 at 22:22
  • 1
    i did first check with a ruler, actually with a finer point scale, and the margins are definitely identical. that's why i tried rotating one of the pages -- still face up -- so that one page top was aligned with the other page bottom, and the left margin of one page was on top of the other's right margin. on a light table, that will show even the tiniest discrepancy, and there was none. we are still using tex live 2012, so a later version might possibly have a different result. one more question -- do your printers default to letter-size paper or a4? (letter is our standard.) – barbara beeton Sep 14 '14 at 12:14
  • @barbarabeeton, my printer is set to US letter paper. I am going to try making the PDFs with other TeX versions/distributions and check the measurements in the PDF itself (e.g., with GIMP) to see if I can sort out what's going on here. – GirlofVito Sep 15 '14 at 21:18
  • 1
    i've noticed with some of our printers that it's relatively easy, when reloading paper, to shove the alignment bars in the paper tray just a bit out of alignment. usually when this happens, the paper gets skewed, so that a margin is slightly slanted from top to bottom -- but not always. this would be worth checking on your printer(s). (if it would help in your checking with gimp, i'd be happy to send the pdf that i produced here. i'd just need an address to mail it to.) – barbara beeton Sep 16 '14 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.