1

In report class with twoside option, how to flushright the marginpar contents on even pages?

The image below was produced manually inserting \hfill. I'd like to automatize it.

enter image description here

MWE

\documentclass[10pt,twoside]{report}
\usepackage{lipsum}
\usepackage{showframe}

\begin{document}
\lipsum*[2]\marginpar{Lorem\dots}
\clearpage
\lipsum*[3]\marginpar{Lorem\dots}
%\lipsum*[3]\marginpar{\hfill Lorem\dots} % <-- desired output
\end{document}

enter image description here

1

Is using marginnote package an option ?

\documentclass[10pt,twoside]{report}
\usepackage{lipsum,marginnote}
\usepackage{showframe}

\begin{document}
\lipsum*[2]\marginnote{Lorem\dots}
\clearpage
\lipsum*[3]\marginnote{Lorem\dots}
%\lipsum*[3]\marginpar{\hfill Lorem\dots} % <-- desired output
\end{document}

enter image description here

enter image description here

  • So the default for marginnote package is like that? – Sigur Jan 26 at 15:22
  • I'd be glad to accept your answer if no other one for marginpar appears. – Sigur Jan 26 at 15:28
  • @Sigur Yes exactly! that's the default alignment with marginnote – Hafid Boukhoulda Jan 26 at 15:35

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.