23

I'm trying to use marginnote on document class book with twoside, but I can't see to get the margin notes strictly on the left. I don't want to be putting \reversemarginpar on all the odd pages. Can someone help me or direct me to help please.

19

You can use the etoolbox package to patch the \@mn@margintest command to set \if@tempswa to be always true and then issue a global \reversemarginpar:

\documentclass[twoside]{book}
\usepackage[centering,marginparwidth=2.5cm,paperheight=10cm]{geometry}
\usepackage{marginnote}
\usepackage{lipsum}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{}
\patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{}
\reversemarginpar 
\makeatother

\begin{document}

\lipsum[1]\marginnote{test test test test test}
\lipsum[1-2]\marginnote{test test test test test}
\lipsum[1-2]\marginnote{test test test test test}
\lipsum[1-2]\marginnote{test test test test test}
\lipsum[1-2]\marginnote{test test test test test}
\lipsum[1-2]

\end{document}

enter image description here

  • Gonzalo Medina, thank you so much!!!!!!!!!!!!!!! It works perfect! – jorge aldana Sep 22 '12 at 18:36
  • 1
    If you want it on the right instead, leave off the \reversemarginpar in Gonzalo's answer. I'm mentioning this because it took me a bit to figure it out. Also it is much simpler than Gonzalo's answer to the same problem here. (This should be a comment, but I don't have have enough reputation.) – Jason Rute Apr 21 '13 at 4:10
  • 2
    This solution has recently stopped working with an updated version of marginnote I think... – Bart Snapp Sep 7 '18 at 15:46

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.