How does one get a margin note on the left on

marginnote

According to the manual,\marginnote[left]{} should typeset "left" on the left margin, not? That's not what I get. Alternatively I could use \reversemarginpar, but is effect is permanent.

\documentclass{report}
\usepackage{lipsum}
\usepackage{marginnote}

\begin{document}

\lipsum[1][1]
\marginnote[\bfseries left]{\bfseries right}
\lipsum[1][2]\par

\reversemarginpar
\lipsum[1][3]
\marginnote[\bfseries left]{\bfseries right}
\lipsum[1][4]\par

\lipsum[1][5]
\marginnote[\bfseries left]{\bfseries right}
\lipsum[1][6]\par

\end{document}

enter image description here

enter image description here

Also see.

https://tex.stackexchange.com/a/14540/112708

Best Answer

You are mis-interpreting the optional argument to \marginnote. The way the first two arguments work for \marginnote is the same as for \marginpar, which is as follows:

\marginpar[LEFT]{RIGHT} prints "RIGHT" when the margin is to the right of the running text, and "LEFT" when the margin is to the left of the running text.

Traditionally when setting two-sided documents, margin notes go into the outer margin, which is to the right of the running text on right-hand pages (odd numbered) and to the left of the running text on left-hand pages (even numbered). In many situations the content of the note will have to be modified depending on where the note is printed. For example, suppose you wish to draw an arrow pointing to a specific line in the text, if you issue \marginpar{$\leftarrow$}, this will look okay with the margin is on the right, but the arrow will point the wrong way when the margin is on the left.

To make it easier to deal with situations like this programmaticly, TeX asks you to provide both variants when there is a handedness to your margin text and choose the appropriate one on the fly based on whether the page is recto or verso. So the example above with the arrow can be coded instead as \marginpar[$\rightarrow$]{$\leftarrow$} and the arrow will be the correct one no matter which page it is on.

For another use case: in my personal lecture notes document class, I define (not using the marginnote package)

    \newcommand{\marginnote}[1]{%
        \marginpar[\raggedleft\marginfont #1]{\raggedright\marginfont #1}}

(Full justification would look awful for the narrow width of the margins, and so it is better to be flush left or flush right; it looks nicer for the choice to be mirror symmetric.)


In your example, normally report is printed single sided, and margins are always on the right. Issuing \reversemarginpar tells TeX to defy convention and print marginpars on the inside margin (which for single-sided documents is the left) instead. So

  • \reversemarginpar\marginnote[left]{} will print 'left' in the left margin, but
  • \normalmarginpar\marginnote[left]{} will print nothing.

(And yes, the \reversemarginpar is only as "permanent" as the next call to \normalmarginpar.)

Related Question