I am currently trying to put a text between 2 lines of equations and align them with the equals sign. I have already read about this in another thread, but I cant get it to work the way I want it.
\begin{equation}
\label{eq:distrib}
\begin{aligned}
n_c &= max\left[N \cdot z_{max} \cdot x, 2 \cdot n_{min}\right] \\
n_{co} &= min\left[ max\left[n_c \cdot x, n_{min} \right], n_c - n_{min} \right]
\enskip \text{where} \enskip x \sim U \left(\left[0, 1\right] \right) \\
n_{cp} &= n_c - n_{co} \\
n_f &= N - n_c
\end{aligned}
\end{equation}
which gives:
Now i want to move that "where part" between n_c and n_co, while keeping everything else the way it is, i.e. all equations aligned at the equals sign and the equation number centered, so that it looks like this:
Following the steps from the other thread I get:
\begin{equation}
\label{eq:distrib}
\begin{aligned}
n_c &= max\left[N \cdot z_{max} \cdot x, 2 \cdot n_{min}\right] \\
n_{co} &= min\left[ max\left[n_c \cdot x, n_{min} \right], n_c - n_{min} \right]
\end{aligned}
\enskip \text{where} \enskip x \sim U \left(\left[0, 1\right] \right)
\begin{aligned}
n_{cp} &= n_c - n_{co} \\
n_f &= N - n_c
\end{aligned}
\end{equation}
However, I dont know how to move the last part into an extra line. Any help would be appreciated, thanks.
Best Answer
You can lower manually the clause:
I used
\max
and\min
(you should, too). I also removed all\left
and\right
tokens, which only do evil here.I'd also suppress all
\cdot
symbols, which are very seldom used to denote multiplication in professional math.However, my feeling is that the clause about x should be moved in the text following the display.