I have some quite long lines of maths I have to put into a two-colum document format, so the maths often needs to be split between multiple lines.
In the example below, I'd like to align the open parentheses in the last line with that in the line above.
\begin{align}
P(&\mathcal{X},\mathcal{C},\xi|\alpha,\beta,\theta^0) \notag\\
&= \prod_d P(\mathcal{X}_d|\beta)P(\mathcal{C}_d|\alpha,\xi) \prod_c P(\xi^c|\theta^0) \notag\\
&\propto\prod_d \beta^d_c \left(F(\mathcal{C}_d)\prod_t (\mathcal{C}_{dt})^{\alpha\xi_t}\right) \notag\\
& \left( \prod_c F(\xi^c)\prod_t(\xi_t)^{\theta^0_t} \right)
\end{align}
Adding another alignment mark pushes the last parts to the right (see below):
\begin{align}
P(&\mathcal{X},\mathcal{C},\xi|\alpha,&\beta,\theta^0) \notag\\
&= \prod_d P(&\mathcal{X}_d|\beta)P(\mathcal{C}_d|\alpha,\xi) \prod_c P(\xi^c|\theta^0) \notag\\
&\propto\prod_d \beta^d_c &\left(F(\mathcal{C}_d)\prod_t (\mathcal{C}_{dt})^{\alpha\xi_t}\right) \notag\\
& &\left( \prod_c F(\xi^c)\prod_t(\xi_t)^{\theta^0_t} \right)
\end{align}
I tried a command called \shoveleft
to shove them to the left, but it didn'nt work:
\begin{align}
P(&\mathcal{X},\mathcal{C},\xi|\alpha,&\shoveleft{\beta,\theta^0)} \notag\\
&= \prod_d P(&\shoveleft{\mathcal{X}_d|\beta)P(\mathcal{C}_d|\alpha,\xi) \prod_c P(\xi^c|\theta^0)} \notag\\
&\propto\prod_d \beta^d_c &\shoveleft{\left(F(\mathcal{C}_d)\prod_t (\mathcal{C}_{dt})^{\alpha\xi_t}\right)} \notag\\
& &\left( \prod_c F(\xi^c)\prod_t(\xi_t)^{\theta^0_t} \right) \notag\\
\end{align}
Both the previous two attempts produce something like the image below. I also tried a split
environment with bizzare results.
Even if \shoveleft
worked, this wouldn't be ideal, as it'd mess with the internal spacing of the first two lines. Ideally, I'd like the first two lines to ignore the &
position markers in the last two lines (something like \multicolumn
in a table).