I sometimes put longer texts in a \marginpar{...}
-command and if the text where the \marginpar{...}
-command is located is at the end of a page the text falls off the page instead of being placed on the next page or moves up to line up with the regular text block:
\documentclass[a4paper,11pt]{memoir}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\lipsum[1]
\lipsum[1]
\marginpar{\lipsum[1]}
\pagebreak
\lipsum[1]
\end{document}
How can I prevent this from happening besides of putting the \marginpar{...}
elsewhere in the text?
\marginpar{\parbox[b]{\marginparwidth}{\lipsum[1]}}
.