9

I am writing my thesis nowadays, and one of the few things the instructions have specific recommendations about is page size and margins.

The page should be A4, and the margins should be: (I revised the description, hopefully in a clearer way)

  • On the margin which will get binded the overall distance from the edge of the page to the text should be about 4cm;
  • the rest of the sides should have about 1.5cm from the edge of the paper to the text.

These spacing instructions include the margin which is part of the page, as well the additional space for binding.

I am using the memoir document class, and I just couldn't get the hang of the spine, the fore-edge, etc. etc.

I tried using the geometry package but it completely broke the compilation and I'm quite lost at the moment. I tried using \setlrmarginsandblock and that too broke the compilation.

Both with several different error messages, amongst them:

You can't use `the character 1' after \the.\headheight ->15pt

which, I suppose, means that some values are being overwritten at some point.

I should also point out that I have added \checkandfixthelayout and that I am loading fancyhdr after that, which may (or may not) be a source of troubles.

How can I solve this issue and have the margins the way I want them?

Thanks!


I just measured a recent printout (before trying to do any changes) and the spacings are 4cm on top and bottom; 3cm on the side of the binding; 5cm on the other side.

WD40
  • 163
  • Judging from some other comments, I wonder if you don't want a 1.5 cm 'margin' from the top and bottom of the page to the header and footer (rather than to the textblock). Otherwise, if you measure the specified margins in @Brent.Longborough's answer, you'll see that they are correct given the earlier specifications. – jon Aug 02 '12 at 19:13
  • @jon: Yes, to header footer seems what I am looking for. As I wrote in the last comment, I am not used to messing with margin sizes and I'm not sure what are the exact terms to use to describe the problem, and names and values I need to assign. – WD40 Aug 02 '12 at 19:17

2 Answers2

6

I assume from the strange way they've specified your layout, and the fact that it's a thesis, that it's one-sided.

Try this (the lipsum bits are just to give us some blind text):

\documentclass[a4paper,12pt,oneside]{memoir}
\setulmarginsandblock{1.5cm}{1.5cm}{*}
\setlrmarginsandblock{4cm}{1.5cm}{*}
\checkandfixthelayout
\usepackage{lipsum}
\begin{document}
\lipsum[1-4]
\end{document}

This solution assumes the margins are "conventional" -- from the page edges to the text block.

I don't know for sure (I've never used it), but fancyhdr does things that memoir has its own facilities for doing, so there may be a conflict there.

If you want to alter stock and trim, you can, but that really only makes sense if you're actually going to physically trim the printed sheets.

  • Actually the recommendation is two-sided, just that about half the theses in the faculty are written in Hebrew (not mine, though). – WD40 Aug 02 '12 at 19:05
  • Is it normal that the .pdf seems extremely stretched, there are absolutely no margins between the header and footer; the left/right margins themselves don't look like 4cm or 1.5cm either. – WD40 Aug 02 '12 at 19:08
  • @WD40 -- You have a two-sided document where every page has a 'left' (!?) margin of 4cm? That seems rather contradictory. (Of course, I have cannot and have not read any Hebrew documents, so maybe it would work there..?) – jon Aug 02 '12 at 19:08
  • Hmm. I suppose that I thought about it the wrong way. I'll edit the question. – WD40 Aug 02 '12 at 19:09
  • 1
    @WD40 -- regarding the layout of the page, try using the showframe package to see what's going on. – jon Aug 02 '12 at 19:09
  • Oh, OK - then they're "inner" and "outer" margins, rather than "left" and "right". The fact that theses are commonly written in Hebrew explains the inverted margins – Brent.Longborough Aug 02 '12 at 19:09
  • When you say "the .pdf seems extremely stretched", two things come to mind: (a) If you're accustomed to US Letter paper, then A4 does look a bit "stretched"; and (b) if you're new to TeX, the textblock is certainly narrower than one sees with many default word processor setup defaults (although not to TeXpeople) – Brent.Longborough Aug 02 '12 at 19:12
  • Using showframe shows that the binding margin is actually correct (left becomes right side on the "backside" of the page). It seems that there is no margin on the top and bottom (almost no spacing between header/footer and the edge of the page). As for the the second comment: neither I am accustomed to US Letter paper, nor I am new to TeX (not that I am extremely familiar with the innerworks, but I am not new to this at all... just never changed margin sizes before). – WD40 Aug 02 '12 at 19:14
  • Yes, I think the default textblock height may be a bit shorter, so the textblock is less stretched-looking. On the margins, many people think the outer margin should be around twice the inner margin. See the question Illogical twoside margins – Brent.Longborough Aug 02 '12 at 19:20
  • 1
    I suppose that the intention was that the text would take the better part of the page, and since the binding may take some space (the university binds it on their own) I suppose they required this for this reason. – WD40 Aug 02 '12 at 19:25
  • Looking at the showframe output without margin modifications; and reading the memman.pdf I get the feeling that what I want has to do with stock and trim. – WD40 Aug 02 '12 at 19:37
2

A slightly more elaborate version. (Perhaps I should put this as a second answer in Brent.Longborough's ..?)

\documentclass[a4paper,12pt,oneside]{memoir}
% \setstocksize{297mm}{210mm} % these are a4 sizes
% \settrimmedsize{297mm}{210mm}{*}
\settypeblocksize{245mm}{155mm}{*}
\setulmargins{2.5cm}{*}{*}
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{1.5cm}{*}{*}

\setlrmarginsandblock{4cm}{1.5cm}{*}
\checkandfixthelayout

\makepagestyle{test}
\makeoddhead{test}{PAGE \thepage}{PAGE \thepage}{PAGE \thepage}
\makeoddfoot{test}{PAGE \thepage}{PAGE \thepage}{PAGE \thepage}
\pagestyle{test}
\usepackage{lipsum}
\begin{document}
\footnote{\lipsum[1]}
\lipsum[1-5]
\end{document}

This answer sets the margins at 1.5 cm to the header and footer rather than to the textblock.

Addendum: As @daleif noted, \checkandfixthelayout can take one of several different optional arguments: [fixed] , [classic], [lines], [nearest]. These will (likely) subtly alter layout of the page, especially if you have things like \flushbottom in effect (which is the default for two-sided documents, I believe). You should see the manual (texdoc memman) for details on how everything is calculated.

jon
  • 22,325
  • This seem to push everything towards one side of the page, the margin itself is pushed off the limits of the page. – WD40 Aug 02 '12 at 19:53
  • @WD40 -- Really? Are you testing this document or these settings in another document? The 'left' and 'right' settings are unchanged from the other answer? All that I changed are the 'top' and 'bottom' settings. – jon Aug 02 '12 at 20:20
  • I put this straight into my thesis. I think I'll give it up and go to the faculty administration when the week starts, I'll ask them on this particular instruction. – WD40 Aug 02 '12 at 20:22
  • @WD40 -- Well obviously you are doing 'extra' things in your thesis! Is there a thesis .sty file you are adding; are you also using geometry (or loading a package that implicitly loads it); etc., etc.? If you test the document, you'll see that the margins do what you asked. If you need something more specific, you need to provide a minimal, but complete and compilable document for others to use and 'fix'. – jon Aug 02 '12 at 20:26
  • 3
    Might be an idea to look into the options that one can give to \checkandfixthelayout, memoir does a rounding textheight to integral number of lines calculation which may confuse some. But then again I find it strange that there is a requirement for the bottom margin. Seems someone in the administration does not know what they are doing. – daleif Aug 03 '12 at 08:26
  • @daleif -- Thanks for the reminder. I added a little bit about that. – jon Aug 03 '12 at 15:11