3

I'm wondering if it's possible to alter the order LaTeX outputs the equation.

The following code

\documentclass{article} \usepackage{systeme} \begin{document} \[ \systeme{3+2t+s=x,s+2=y,1+t+2s=z} \] \end{document} 

outputs

enter image description here

This really hurts my eyes as I would like the numbers to be displayed first, followed by the t and the s lastly.

5
  • 2
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Commented Feb 21, 2019 at 13:19
  • 1
    @StefanPinnow - I just converted the OP's code snippet into an MWE. :-) Commented Feb 21, 2019 at 13:23
  • 1
    @Mico Thank you, always, very much for your cordiality. Commented Feb 21, 2019 at 13:24
  • 1
    According to the first full paragraph on page 2 of the package's user guide -- I'm translating loosely from the French original -- "the left-hand side material may contain constant terms. If that's the case, regardless of where on the left hand side the constant terms are entered, they will be displayed last, i.e., just before the equal signs." In short, your quest to have the numbers displayed first cannot be fulfilled, at least not by the current version of the package -- which is version 0.32, 13 Jan 2019, on my system. Commented Feb 21, 2019 at 13:29
  • If alternatives to systeme are considered, then see tex.stackexchange.com/questions/35174/… Commented Feb 21, 2019 at 16:22

4 Answers 4

2

As I noted in an earlier comment, the systeme package doesn't currently allow you to start the left-hand-side material with a constant.

It's not too difficult, though, to achieve your formatting objective by employing an array environment.

enter image description here

\documentclass{article} \usepackage{array} % for '\newcolumntype' macro \newcolumntype{C}{>{{}}c<{{}}} % for columns with binary and relational operators \newenvironment{myarray}[1]{% \setlength\arraycolsep{0pt} \left\{ \begin{array}{#1}}{% \end{array} \right.} \begin{document} \[ \begin{myarray}{rCrCrCl} 3&+&2t&+& s&=&x\\ 2& & &+& s&=&y\\ 1&+& t&+&2s&=&z \end{myarray} \] \end{document} 
2

You can force systeme v. 4 to do it.

\documentclass{article} \usepackage{systeme} \begin{document} \[ \def\x{x}\def\y{y}\def\z{z} \systeme[ sort={a,t,s = *}, post subst = {a}{}, ]{3a+2t+s=\x,2a+s=\y,1a+t+2s=\z} \] \end{document} 

output

1

As of systeme v0.45 27 (septembre 2025), you could use [sort={x, y, z, t = * }] to change the order of variables. But constants defaults to be aligned to the right.

\documentclass{article} \usepackage{systeme} \begin{document} \[ \systeme[sort={x, y, z, t = * }]{ x + y + 2z + t = 0, 2y + 2t = 0, 2x + t = 0 } \] \end{document} 

equation with custom order of variables

0

Thanks for the answers!

Adding a [xxxx] to \systeme{3+2t+s=x,s+2=y,1+t+2s=z} sorted it out.

In this case \systeme[1ts]{3+2t+s=x,s+2=y,1+t+2s=z}.

Regards!

1
  • While this answer succeeds in placing 1 in first position in the third row, it does not place 3 and 2 in first position in rows 1 and 2, respectively. Commented Feb 28, 2019 at 13:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.