[Tex/LaTex] Equation with note and tag

equations

Given the following set of equations as an example:

`...
\begin{align}
    x &= y^2 + 3 \\
    y + 3 &= 11
\end{align}`

The equations will be center aligned with respect to the "=" sign and tagged on the left with equation numbers. Is there a way I can add a note to the side of one of the equations without affecting the positioning of the equations (i.e. not shifting the group of equations upon insertion of the note)?

I've tried '{flalign}', but the group of equations shifts upon addition of the note. I've tried to find a way to add an additional tag on the right, but have come up empty. I've used '\qquad', but that, too, shifts the group of equations.

Here is the reason: aesthetics. If I have two groups of equations that are centered (using gather or similar), the group of equations that includes the note will be shifted from the other groups of equations. I just think this looks sloppy… call me picky.

Example output:

(left)         (center)           (right)
(1)            xyz = abc
(2)            abc = xyz
{next math group}
(3)            cba = abc
(4)            yzx = cba        some text

Thanks in advance.

Best Answer

A solution with flalignand \llap, so no \phantom is used. Two cases may happen : either the note is short enough to not overlap the equation, or it is too long. For the first case, I define a shorteqnote command; in the second case, the note has to be written on the next line; a \longeqnote command is defined. A note is supposed to be at most one line long (anyway, would that be sensible?).

        \documentclass[ a4paper, leqno]{article}

        \usepackage[utf8]{inputenc}
        \usepackage[T1]{fontenc}
        \usepackage{lmodern}
        \usepackage[showframe, textwidth = 15cm, nomarginpar, noheadfoot]{geometry}

        \usepackage{mathtools}

        \newcommand{\shorteqnote}[1]{ &  & \text{\small\llap{#1}}}
        \newcommand{\longeqnote}[1]{& & \\ \notag  &  &  &  &  & \text{\small\llap{#1}}}

        \begin{document}

        This results in this :
        \begin{flalign}
         &  & xyz  & = abc \\
          &  &           abc  & = xyz  &  & \\
        \shortintertext{next math group: }
            &  &           cba &= abc \shorteqnote{(A short note)} \\
            &  &        x^2 + y^2  + z^2& = x^2 + y^2 + z^2 \longeqnote{(A longer note:  True only in characteristic 2)}
        \end{flalign}

        \end{document}​ 

enter image description here

Related Question