split a long, multiline formula over two lines
March 29th, 2006 by Lawrence David
to split a long, multiline formula over two lines, import the “amsmath” package and use the “split command” and double slashes.
for instance, to produce the above equation, use the following code:
\usepackage{amsmath}
…\begin{split}
\arg\max_\Theta\left[\sum_zP(\mathcal{G}|\mathcal{D},\mathcal{S})
P(\mathcal{G}|\mathcal{S},\Theta_n)\log{P(\mathcal{D}|\mathcal{G},
\mathcal{S},\Theta)}\right. \\
+
\left.\sum_zP(\mathcal{G}|\mathcal{D},\mathcal{S})P(\mathcal{G}|
\mathcal{S},\Theta_n)\log{P(\mathcal{D}|\mathcal{G},\mathcal{S},\Theta)}\right]
\end{split}

Hi!

You didn’t get anything wrong here. I just wanted to tell you that your website is perfect!
Roozbeh
Great tip! do you know a good way to guaranty that in your example, the square brakets are the same size.
In your example they look similar in height but this is only a coincidence if the top line didn’t have a \sum then the brakets will have different sizes.
I am having that problem right now. (I know you can hack it and add a invisible symbols but thats not the solution I am looking for).
sorry – no idea!
if you figure it out, feel free to leave a note here in the comments!
Thanks for the tip! Had a nasty equation that was covering up its own number, but managed to fix it with this
to have [ of the same size
type \right. before first \\,
then \left. at the start and \right]
as usual in the end, or smth like this.