2

I am new to LaTeX and to this site. I am setting up a book using the header I found in Why can't I get the height of my memoir typeblock right? (Luckily enough, I wanted exactly the same page size and proportions between text and margins.)

Now I have a text with plenty of sidepars, and I need to adjust the marginparsize using \setmarginnotes, because the default ones I get are really too wide.

My question is on how to determine the optimal linewidth for my margin notes. Is there a golden rule formula?

I had to edit my question because I can't use comments (too much text) and I'm not allowed to answer my own question.

\documentclass{memoir}


\setstocksize{210mm}{148.5mm}
\settrimmedsize{210mm}{148.5mm}{*}
\settypeblocksize{*}{261.46141pt}{1.41421356}
\renewcommand{\sideparfont}{\footnotesize}%

\makeatletter
\newcommand{\psize}{\f@size}
\makeatother

\setlxvchars
\newlength{\typeareaheight}\setlength{\typeareaheight}{1.41421356\lxvchars} % this factor works for all A-series paper formats ... and only for those
\newlength{\minheadsep}\setlength{\minheadsep}{.8\baselineskip} % completely arbitrary minimal \headsep
\newlength{\correctedheadsep}
\newlength{\headerheight}\setlength{\headerheight}{\baselineskip}
\newlength{\correctedtextheight}
\setlength{\correctedtextheight}{\typeareaheight}
\makeatletter
\setlength{\@tempdima}{\typeareaheight}%
\addtolength{\@tempdima}{-\headerheight}%
\addtolength{\@tempdima}{-\minheadsep}%
\divide\@tempdima \baselineskip
\@tempcnta=\@tempdima
\setlength{\correctedtextheight}{\@tempcnta\baselineskip}%
\makeatother
\setlength{\correctedheadsep}{\typeareaheight}
\addtolength{\correctedheadsep}{-\correctedtextheight}
\addtolength{\correctedheadsep}{-\headerheight}
\settypeblocksize{\correctedtextheight}{\lxvchars}{*}
\newlength{\totaltopmargin}
\setlength{\totaltopmargin}{21.9mm}
\addtolength{\totaltopmargin}{\headerheight}
\addtolength{\totaltopmargin}{\correctedheadsep}
\setulmargins{\totaltopmargin}{*}{*}
\setlrmargins{*}{*}{2}
\setheaderspaces{*}{\correctedheadsep}{*}
\checkandfixthelayout[fixed]
\sideparmargin{outer}

\usepackage{polyglossia}
\setdefaultlanguage{latin}
\usepackage{lipsum}


\begin{document}

\sidepar {Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.}     \lipsum    
\lipsum

\end{document}

This is it. I don't like the margin note width, it's too large in my opinion. What would be the right width? How do you calculate it?

Thank you, A

  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – jubobs Jun 26 '14 at 14:14
  • Hi Jubobs, thank you for your comment. I have edited my question. – user56153 Jun 26 '14 at 15:05
  • With that amount of marginpar text, you're going to need a wider marginpar (if, indeed the whole document is like that). In that case, you'll have toreduce the width of the typeblock, and the 1.414... ratio is going to make your textblock (height) very short. I was also a bit mystified by all the length arithmetic; if you could explain the geometry you want, I'm sure we could work out a simpler way to do it. It may also be that instead of marginpars, you would be better off with some kind of parallel text mechanism. – Brent.Longborough Jun 26 '14 at 16:15
  • Dear Brent, thank you for your comment. Maybe my problem is not about using the memoir package rather than an aesthetic one. The idea is to get a layout following the classic golden rule. I just used the preamble block from another post. Maybe the solution is to further divide the outer margin by 9 and use 6 9ths of the margin for my sidepars, plus 1 9th of the margin as a space between the text and the margin note. like this: \setmarginnotes{3.66667mm}{22mm}{0pt} – user56153 Jun 26 '14 at 16:26
  • Ah! the golden rule would mean a typeblock proportion of 1.612, rather than 1.414 (which is the proportion of the page. But I still think your margins are gpoing to be crowded. You may need to go to something more extreme. For example, my copy of Bringhurst's Elements has a 2:1 typeblock proportion. Oh, and I've just noticed your page size - A5; that's going to cramp your style considerably. – Brent.Longborough Jun 26 '14 at 17:37
1

Following up on my comments, here's a suggestion, which I hope you won't find too ugly (I didn't explicitly tune the marginparwidth).

It's based on a 2:1 ratio for opposite margins, and for the textblock. In order to make it fit reasonably, I've taken an arbitrary 20% off the textblock width to start with.

And I hope you'll agree that the source is considerably simpler (IMHO):

\documentclass[a5paper]{memoir}
\setlxvchars
\settypeblocksize{*}{0.8\lxvchars}{2}
\renewcommand{\sideparfont}{\footnotesize}%
\setulmargins{*}{*}{2}
\setlrmargins{*}{*}{2}
\checkandfixthelayout[fixed]
\sideparmargin{outer}
\setmarginnotes{0.1\foremargin}{0.7\foremargin}{\onelineskip}
\usepackage{polyglossia}
\setdefaultlanguage{latin}
\usepackage{lipsum}


\begin{document}

\sidepar {Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.}     \lipsum    
\lipsum

\end{document}

Output image

  • It looks good: but is there any rule for finding an optimal marginpar width? – user56153 Jun 26 '14 at 19:12
  • There probably is, but I don't know it. But for when we know, I've added a line to tweak the marginpar. – Brent.Longborough Jun 26 '14 at 19:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.