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.
\max
and\min
\intertext{...}
wrapper. Next, get rid of bothaligned
environments and use a singlesplit
environment inside theequation
environment.