3

With \tiny and \scriptsize font sizes, marginnote adds extraneous vertical space after the first line. It seems to work fine with \footnotesize and upwards.

By comparison, \marginpar does not have this issue.

Assuming this is a bug, the question becomes: is there an easy remedy?

\documentclass{article}
\usepackage{marginnote}
\begin{document}
\reversemarginpar
\noindent text\marginnote{\tiny some long text here that includes two line breaks}
\end{document}

output

steve
  • 2,154

1 Answers1

3

marginnote inserts a \strut before your \tiny, and this gives a rather large spacing. Redefine \marginfont if you want to change the fontsize:

\documentclass{article}
\usepackage{marginnote}
\renewcommand*{\marginfont}{\tiny}
\begin{document}
\reversemarginpar
\noindent text\marginnote{some long text here that includes two line breaks}
\end{document}

enter image description here

Ulrike Fischer
  • 327,261
  • This has the problem that now the baseline of the margin note doesn't align with the baseline of the main text – steve Oct 10 '21 at 14:10
  • Never mind, just solved my second issue as well (without redefining \marginfont, but instead just using \marginnote{\strut\parbox[t]{\marginparwidth}{\scriptsize#1}} – steve Oct 10 '21 at 14:16