Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

closed as too localized by Foo Bar, cgnieder, Martin Schröder, Claudio Fiandrino, qubyte Feb 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 –  cgnieder 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

1 Answer 1

up vote 1 down vote accepted

enter image description here

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}
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.