4

I have a main text column with margin a line separation of 1.05 (\setstretch{1.05}), and margin texts generated with a tighter line separation with the following macro:

\newcommand{\mnote}[1]{\marginpar{\raggedright\textsf{\footnotesize{%
\textsf{\footnotesize{%
\begin{spacing}{1.025}%
#1%
\end{spacing}%
}}}}}}%

This results in the following output, where the margin paragraph is not properly algined with the first line of the paragraph of the adjacent main text:

misaligned margin note http://dl.dropbox.com/u/19252957/mnote.png

This is kind of a tough problem to solve. Does someone have any suggestions?

  • It's not entirely clear what you want the output to be. The baseline of the marginpar text should align with the baseline of the line of the main text? – Seamus May 16 '12 at 18:28
  • Beside David’s observation you could also take a look at package marginnote, which places margin notes on the current line. The macro \marginnote provides an optional argument for the vertical adjustment (and the package itself has options regarding this). – Speravir May 16 '12 at 19:51
  • Yes, the baseline of the marginpar text should be aligned with the baseline of the main text line. – Koffiman May 18 '12 at 14:45
6

It's the spacing environment:

enter image description here

\documentclass{article}
\usepackage{setspace}

\newcommand{\mnote}[1]{\marginpar{\raggedright
\textsf{\footnotesize{%
\begin{spacing}{1.025}%
#1%
\end{spacing}%
}}}}

\newcommand{\mnoteb}[1]{{\marginpar{\raggedright\sffamily\footnotesize
\setstretch{1.025}%
#1}}}

\def\a{One two three four five. }

\begin{document}
\setstretch{1.5}

\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\mnote{\a\a}
\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\mnoteb{\a\a}
\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a
\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a

\end{document}

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.