# LaTeX: Multiple equation numbers in one equation environment

I have a system containing four equations written in the equation environment with systeme. At the moment, these four lines have one common equation number. However, I want that they each have their own reference number. I used the systeme tool because I want the variables to be aligned, which works nice with the systeme tool.

My full system of equations contains over 12 variables and 15 rows, explaining why I do not want to use the align environment, because I'll have to deal with alignment myself, by including many '&' symbols.

$$\sysdelim.. \systeme{ 0 \leq 0 , y_1 - z_1 \leq 0, -y_1 + z_1 \leq 0, 0 \leq 0}$$


• You have been migrated to tex.stackexchange, note that here it is custom to provide a full minimal example not just a sniplet like this. Not everyone is familiar with \systeme, so please extend this example to something self contained that others can copy and test unchanged. – daleif Nov 28 '19 at 14:56
• systeme does not provide for separate labels for each line. – egreg Nov 28 '19 at 15:39

There is a environment designed to do exactly this, the align environment. What you want can be achieved as follows.

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
0 &\leq 0,\\
y_1 - z_1 &\leq 0,\\
-y_1 + z_1 &\leq 0,\\
0 &\leq 0
\end{align}
\end{document}


The result looks like this.

I added everything necessary to make it compile on its own. The & tells LaTeX where to align equations. \\ functions as a linebreak as usual. If you want to do more advanced constructions with equations, the userguide for amsmath is really helpful.

• While this certainly produces the desired result, the OP explicitly said that align wasn't wanted because it requires & signs, which have to be carefully placed manually. – barbara beeton Nov 28 '19 at 18:04
• When I answered the question, this constraint wasn't mentioned. – Dave Nov 28 '19 at 18:26

With systeme there is no provision for separate numbers for each equation.

Here's a workaround that assumes no line has “strange” height or depth.

\documentclass{article}
\usepackage{empheq,systeme}

\newcommand{\esysteme}[1]{%
\sysdelim..%
\raisebox{\jot}{%
\systeme{#1}%
}%
}

\begin{document}

\begin{empheq}[left=
\esysteme{
y_1 - z_1 \leq 0,
-y_1 + z_1 \leq 0,
y_1 - z_1 \leq 0,
-y_1 + z_1 \leq 0
}
]{gather}
\\ \\ \\
\end{empheq}

\end{document}


With less user code:

\documentclass{article}
\usepackage{empheq,systeme,xparse}

\ExplSyntaxOn
\NewDocumentCommand{\esysteme}{m}
{
\begin{empheq}[left=\sysdelim..\raisebox{\jot}{\systeme{#1}}]{gather}
\prg_replicate:nn { \clist_count:n {#1} - 1 } { \\ }
\end{empheq}
}
\ExplSyntaxOff

\begin{document}

\esysteme{
y_1 - z_1 \leq 0,
-y_1 + z_1 \leq 0,
y_1 - z_1 \leq 0,
-y_1 + z_1 \leq 0
}

\end{document}