0

I am struggling regarding the alignment and spacing of the numbers within the cases. For alignment I usually use arrays but those don't seem to work within cases. The questions and answers I found here were only regarding one alignment where the & would work with arrays. But I have multiple alignments, and multiple &'s don't work within a case.

I now use the systeme package, but that package is not really stable. Especially when using brackets and letters. Also spacing is an issue within the current solution, as seen on the right. The numbers are pretty close together. I also tried things like \quad but pretty much always the case breaks because of the alpha's

\systeme{
  x_1       +         2x_2       +              2 x_3       =       \alpha,
                       x_2                                  =       \alpha,
 2x_1       +         3x_2       +         \alpha x_3       =       0}

Wanted result Current result

While my current work (below one) is acceptable, I rather have the spacing the upper one has. It looks a lot better. Does anyone have a method how to achieve the alignment of the upper one? I rather not use the systeme package if that's possible.

2 Answers 2

1

Here is a solution using the IEEEeqnarraybox environment from the IEEEtrantools package. The ; glue defines 5/18 em and the ' glue defines 1 em separation between columns.

enter image description here

\documentclass{article}

\usepackage{IEEEtrantools}

\begin{document}
\[
\left\{
\begin{IEEEeqnarraybox}[\relax][c]{;r'r'r'r'r'C'l}
      x_1       &+&         2x_2       &+&              2 x_3       &=&       \alpha,\\
                & &         x_2        & &                          &=&       \alpha,\\
     2x_1       &+&         3x_2       &+&         \alpha x_3       &=&       0
\end{IEEEeqnarraybox}
\right.
\]
\end{document}
1
  • Exactly what I wanted, thank you! Jan 29, 2022 at 15:02
1

The solution is explained in § 1.9, Espaces autour des signes, p.6 in the documentation:

\documentclass{article}
\usepackage{systeme}

\begin{document}

\syssignspace{0.5em}\syseqspace{0.5em}
\systeme{
  x_1 + 2x_2 + 2 x_3 = \alpha,
                       x_2 = \alpha,
 2x_1 + 3x_2 + \alpha x_3 = 0}

\end{document} 

enter image description here

3
  • I see, that is also a great solution. I rather not use \systeme so I will use the other answer. But thank you for your effort! Jan 29, 2022 at 15:04
  • 1
    Yet systeme is a package which simplifies a lot of coding. The alternative, in my opinion, is the use of alignat , but the code is much more complex.
    – Bernard
    Jan 29, 2022 at 15:09
  • I will look into it more later. For now systeme felt too out of control. While this probably is also a part my inexperience, I rather now use the more complex code where I feel I have full control. Thanks again! Jan 29, 2022 at 15:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .