I've run into a problem using the marginnote package; the vertical position changes if the note is wider than the margin. An MWE:
\documentclass{article}
\usepackage{lipsum,marginnote}
\setlength{\marginparwidth}{0.5in}
\begin{document}
\leavevmode%
\marginnote{Overlong}%
\lipsum[1]
\leavevmode%
\marginnote{Not Overlong}%
\lipsum[1]
\end{document}
The first note, wider than the margin, is set about half a line lower than the second. Using vanilla \marginpar
instead sets both margin notes at the correct vertical position.
How can I get the vertical position to be set consistently using \marginnote
? At this point, I'm using \parbox
es, but then I lose the left/right justification.
\marginnote
that is wider than\marginparwidth
, then you can set them in boxes that shorter no wider. For example, using\rlap{\rule{1.1\marginparwidth}{2pt}}
sets the rule in a zero-width box. I'm not exactly sure what the\marginnote
contents is, so I don't know whether this works for you or not.\nolinebreak
also works:\marginnote{\nolinebreak\rule{1.1\marginparwidth}{2pt}}
.\nolinebreak
didn't have any effect for me; the notes still go in different places.\marginpar
s.