9

How can I put the numbering in the systeme package to the left instead to the right?

The "naive" approach as in the following example doesn't work.

\documentclass{article}

\usepackage{systeme}
\begin{document}
\sysdelim..

\systeme{
2x + 3y = 4 @ \mathrm{I},
-x + 7y = -1 @ \mathrm{II} 
}

% This doesn't work:
% \systeme{
% \mathrm{I} @ 2x + 3y = 4,
% \mathrm{II} @ -x + 7y = -1
% }

\end{document}
  • anyway, the command suffixed @iii in the systeme package can most likely be altered to swap the numbering. – 1010011010 Jun 25 '15 at 9:13
  • Sorry, I had a trailing systeme.tex document in the same folder. I'll check it out tomorrow somewhere... This shouldn't be too hard – 1010011010 Jun 25 '15 at 21:21
  • @1010011010 Did you succed in making it work? – student Jul 11 '15 at 16:59
  • equations in system can be numbered automatically – touhami Jul 21 '15 at 23:06
  • For automatically numbered equations Roman number try \uppercase\expandafter{\romannumeral*} – Salim Bou Jul 22 '15 at 8:33
7
+50

Here a workaround, we can change the position of numbering with \syscodeextracol
the default is \syscodeextracol{\kern1.5em$}{$} which mean 1.5em from the end of equation, the two $ to put numbering inside math mode. Depending on the length of the equation we can change the position of numbering with negative space.

\documentclass{article}
\usepackage{systeme}


\begin{document}

\sysdelim..

\systeme{
2x + 3y = 4 @ \mathrm{I},
-x + 7y = -1 @ \mathrm{II} 
}

\bigskip
\syscodeextracol{\kern-8.5em\hfill$}{$\kern8.5em}

\systeme{
2x + 3y = 4 @ \mathrm{I},
-x + 7y = -1 @ \mathrm{II} 
}

\bigskip
\syscodeextracol{\kern1.5em$}{$}% return to default

\systeme{
2x + 3y = 4 @ \mathrm{I},
-x + 7y = -1 @ \mathrm{II} 
}


\end{document}

enter image description here

Update 1

To simplify the code we can create two commands \rightnum{width of equation} and \leftnum to switch between numbering on the right or on the left.

\documentclass{article}
\usepackage{systeme}

\newcommand{\rightnum}[1]{\syscodeextracol{\kern-#1\hfill$}{$\kern#1}}
\newcommand{\leftnum}{\syscodeextracol{\kern1.5em$}{$}}% return to default

\begin{document}

\sysdelim..

\systeme{
2x + 3y = 4 @ \mathrm{I},
-x + 7y = -1 @ \mathrm{II} 
}

\bigskip
\rightnum{8.5em}

\systeme{
2x + 3y = 4 @ \mathrm{I},
-x + 7y = -1 @ \mathrm{II} 
}

\bigskip
\leftnum

\systeme{
2x + 3y = 4 @ \mathrm{I},
-x + 7y = -1 @ \mathrm{II} 
}


\end{document}

Update 2

You can define the width of the box containing the whole system of equations as the length of negative space,
in this case you do not need to enter manually any space to left align numbering.

Here to put numbering on left side we use \systemeL command, for numbering on the right we keep on command \systeme

\documentclass{article}

\usepackage{systeme}
\newlength{\systemewd}

\newcommand\systemeL[2][]{
\settowidth{\systemewd}{\systeme{#2}}
\syscodeextracol{\kern-\systemewd\hfill$}{$\kern\systemewd}
\systeme [#1]{#2}
\syscodeextracol{\kern1.5em$}{$}}


\begin{document}

\sysdelim..

\systemeL{
2x + 3y + 4z = 4 @ \mathrm{I},
-x + 7y - 6z = -1 @ \mathrm{II}, 
3x +  y - 2z = 3 @ \mathrm{III}
}

\bigskip

\systeme{
2x + 3y + 4z = 4 @ \mathrm{I},
-x + 7y - 6z = -1 @ \mathrm{II}, 
3x +  y - 2z = 3 @ \mathrm{III}
}

\bigskip

\systemeL[yx]{
2x + 3y = 4 @ \mathrm{I},
-x + 7y = -1 @ \mathrm{II}
}

\end{document}

enter image description here

  • Thanks. But do I understand you correctly, that I have to adjust the \kern parameter for each system individually? – student Jul 20 '15 at 8:21
  • Yes, unfortunately this is the method here. or if you have a way to know the length of the longest equation this could simplify matters – Salim Bou Jul 20 '15 at 10:52
  • Thanks thats what I wanted. I just wondered how to make the numbers on the left also left aligned, but this seems to be no problem because I can just change \syscodeextracol{\kern-\systemewd\hfill$}{$\kern\systemewd} to \syscodeextracol{\kern-\systemewd$}{$\kern\systemewd} – student Jul 26 '15 at 9:28

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.