# Using decimal numbers with systeme package

Since different equations of are separated with a comma, it prevents me from using decimal numbers in the systems of equations.

1) I haven't found a separate LaTeX command to type a comma in math mode in order to circumvent this problem. Is there one? 2a) How to modify systeme so that I can input commas as usual? OR 2b) How to modify systeme so that I can change the argument separator to semicolon (instead of comma)?

MWE:

\documentclass{memoir}
\usepackage{systeme}
\begin{document}
\systeme{2x-y=\frac{3}{2},x+2y=6}
\end{document}


MNWE:

\documentclass{memoir}
\usepackage{systeme}
\begin{document}
\systeme{2x-y=1,5,x+2y=6}
\end{document}


## 2 Answers

You have to declare the letter, which separates the formulae with an extra optional argument: \systeme[][:]. In this case, the colon is used as separator.

\documentclass{memoir}
\usepackage{systeme}
\begin{document}
\systeme[][:]{2x-y=1,5:x+2y=6}
\end{document}

• That should do it! (It's not a permanent global change, but that seems to be the neatest one.) What is the first optional argument for? I didn't interpret the original French manual... – JoonasD6 Dec 21 '16 at 0:08
• @JoonasD6: I don't speak french, neither. I am sorry :-( – Jan Dec 21 '16 at 0:10

Using 1,5 in math mode for a decimal number is wrong, as it produces a thin space after the comma.

If you have just a few of these numbers, you can just input them like 1{,}5. Otherwise it's best to use siunitx and its \num command.

\documentclass{memoir}
\usepackage{systeme}

% for the second solution (recommended)
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}

\begin{document}

\systeme{2x-y=\frac{3}{2},x+2y=6}

\bigskip

\systeme{2x-y=1{,}5,x+2y=6}

\bigskip

\systeme{2x-y=\num{1.5},x+2y=6}

\end{document}


You can type \num{1.5} as well as \num{1,5} and the output will be the same.

• I tend to use the icomma package for fixing the spacing. I have never got interested in siunitx package as its syntax is cumbersome; it's most often faster to just write stuff like \mathrm{\,kg} yourself because many things that regularly need little to none work need lots of commands and environments with the package. :S But thanks a lot for the tip about {,}. It's not the cleanest solution, but it'll work in a pinch! – JoonasD6 Dec 21 '16 at 0:05
• @JoonasD6 I'd never use 1,5 in such text, to be honest, but, instead, 3/2. – egreg Dec 21 '16 at 0:10
• Too bad then how I'll have to teach students to be fluent in all possible ways to express rational numbers. :) Were this some physics application, a measurement of 1,5 would not be written as a fraction that would mask its precision. – JoonasD6 Dec 21 '16 at 0:19