[texhax] 3x3 array of alighned equations

Novak Elliott N.S.J.Elliott at warwick.ac.uk
Wed Nov 9 14:02:34 CET 2005

Hi everyone,

>>> Robin Fairbairns <Robin.Fairbairns at cl.cam.ac.uk> 11/03/05 04:48pm >>>
>> The alignat environment works a treat except now I'd like to get the subequation numbering 
>> working.
>> Something I've tried:
>> \begin{alignat}
>> \renewcommand{\theequation}{\arabic{equation}a,b,c}
>> a&=b & &=c & &=d\\
>> a&=bbbb & &=c & &=d\\
>> a&=bb & &=c & &=d
>> \end{alignat}
>> but this gets ignored and produces the standard (1), (2), (3) on consecutive lines.
>> What actually I want is (1a,b,c), (1d,e,f), (1g,h,i) on consecutive lines.
>> The above trick does work in the equation environment but perhaps the the command 
>> "theequation" 
>> isn't used in alignat?
> amsmath does its labelling in its own enigmatic way.
> try
> \begin{alignat}
> a&=b & &=c & &=d \tag{\theequation a,b,c}\\
> a&=bbbb & &=c & &=d \tag{\theequation d,e,f}\\
> a&=bb & &=c & &=d \tag{\theequation h,h,i}
> \end{alignat}

this gets me most of the way there.  I found I needed to insert a \stepcounter{equation} before the \begin{alignat} line.  So what I end up with is asthetically what I set out to achieve.  However, it would be 'nice' to be able to reference each of the equations individually.  If I add a couple of labels:

a&=b & &=c & &=d \tag{\theequation a,b,c}\label{one}\\
a&=bbbb & &=c & &=d \tag{\theequation d,e,f}\label{two}\\
a&=bb & &=c & &=d \tag{\theequation h,h,i}\label{three}

Then the command \ref{one} produces "1a,b,c", \ref{two} produces "1d,e,f" etc.
I'd like to be able to reference, for example, equation 1e, or equation 1h, rather than all three equations on the same line.  ie, the \tag's are correct but I want the labels to be different than the tags.  Is it possible to set a label to be equal to the \theequation variable at the start of a set of equations?  That way I could reference each individual equation as \ref{myequations}a, \ref{myequations}f, etc.


p.s. Using the subequations environment doesn't work, it simply sets the tags to be (1a), (1b) and (1c) for the first, second and third lines, respectively.

More information about the texhax mailing list