1

Let's say I wish to use IEEEeqnarray to typeset an equation like the following: enter image description here

Obviously I can do this by manually inserting lots of spacing commands, but I would prefer to be able to do this by specifying the column alignment when the IEEEeqnarray environment is started. So I have been experimenting with various alignment options such as

\begin{IEEEeqnarray}{lCr}

but can I only achieve an equation typeset similar to enter image description here

How can I do this through the allignment option?

  • Do you want y=x... left-aligned and +gg.. right-aligned? Is you y=x... really that wide? Perhaps a more practical example would be helpful. – Werner Nov 11 '13 at 6:01
  • If that is a single equation try multline environment from amsmath. See, e.g., tex.stackexchange.com/a/134447/27635 – karlkoeller Nov 11 '13 at 6:05
3

Do you remember about ampersands?

\documentclass{article}
\usepackage{IEEEtrantools}


\begin{document}


\begin{IEEEeqnarray}{lCr}
  y&=&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\
 && {}+gggggggggggggggggggggg
\end{IEEEeqnarray}

\end{document}

enter image description here

Please observe not only big C for proper spacing around =, but also {} for proper spacing around + in the second line.

  • I remember the ampersands but have not seen their use in conjunction with {}. Thanks; just what I was after. – Freakalien Nov 11 '13 at 9:05
  • The {} is to position "+" as a binary operator, I suppose. If you remove it, it shifts the "+" a little bit closer to the ggggg.... expression. With the {} in place, it does not print anything, but it gives a little extra of space between "+" and gggggg... – Diego Dias Sep 17 '17 at 23:25

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.