I would like to produce the following output:


To be precise, I would like the two equations to be aligned as produced by \eqnarray*, and the two labels L_1 and L_2 to also be aligned. I could use \begin{array}{crcl} L_1& left side & = & right side \end{array}, but then there is too much space before and after the = sign. I think I could adjust that space with some parameters, but I would like this to work also on a web page with MathJax, and in any case I feel there should be a better way to do it. The way I produced that output works but I don't feel is the right way to do it, here is what I did:

 L_1: \hspace{3.1ex} x+y&=&1\\
 L_2: \hspace{1ex} 2x+2y&=&2
  • 1
    You shouldn't use eqnarray – the spacing around the = signs is not good. – Bernard Jun 25 '19 at 16:46

The alignat environment from amsmath gives you full control on the spacing between columns of equations:



 & L_1: & x+y &=1 \\
 & L_2: & \enspace 2x+2y&=2


enter image description here

  • This is just what I was looking for - and it works with MathJax too. – Valerio De Angelis Jun 25 '19 at 23:01

Adapting the @Salim Bou's macro Place numbering in systeme package to the left, using systeme package, you can obtain, this little MWE with another similar result:

enter image description here

\newcommand{\leftnum}{\syscodeextracol{\kern1.5em$}{$}}% return to default
\[\systeme{x+y=1 @{L_1:}, 2x+2y=2 @{L_2:}}\]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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