# margin note left of an equation? [closed]

How is it possible to place a margin note left of an equation? I'm using scrartcl from KOMAScript.

I set \reversemarginpar, then I tried with \marginnote from the package marginnote and also with Latex's own \marginpar and with \marginline from KOMAScript:

\documentclass{scrartcl}

\usepackage{mathtools}
\usepackage{marginnote}

\reversemarginpar

\begin{document}
\marginnote{test} \begin{align*}
a &= b \\
c &= d
\end{align*} \marginnote{test2}
\end{document}


The first marginnote (test) is left of the line before the align and the test2 note is next to line after the align. A margin note in the align gives errors. I know I can adjust the vertical offset with marginnote, but that means I have to do it manually (what is not a very good solution IMHO).

How can I place a margin note next to an equation?

## closed as too localized by Foo Bar, clemens, Martin Schröder, Claudio Fiandrino, qubyteFeb 2 '13 at 13:41

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

• I get no errors when I place \marginnote inside the align environment – clemens Feb 2 '13 at 12:41
• Ah, you are right. The erros only come with \marginpar{}. Seems I didn't tried with \marginnote inside align... I voted for a close. – Foo Bar Feb 2 '13 at 12:45

You can use \tag to use an equation label, but offset it into the margin:

\documentclass{scrartcl}

\usepackage{mathtools}
\usepackage{marginnote}
\newcommand\mathnote[1]{\tag*{\llap{\smash{\parbox[t]{\marginparwidth}{%
\raggedright#1}%
\setbox0\hbox{)}%
\kern\dimexpr\marginparsep+\displaywidth-\wd0\relax}}}}
\reversemarginpar

\begin{document}
\noindent X\dotfill X

\marginnote{test} \begin{align*}
a &= b\mathnote{test3 . . . . . . . . } \\
c &= d
\end{align*} \marginnote{test2 . . . . . . . . . }
\end{document}