3

With the code

\begin{eqnarray}
\Bra{\psi(0)}b_n^+b_n\Ket{\psi(0)} = \nonumber\\
\Bra{\psi_0}(\sum_l U^l_n a_l^+(t) + V^l_n a_l(t))(\sum_m U_n^m a_m(t) + V_n^m a_m^+(t))\Ket{\psi_0}
\end{eqnarray}

or

\begin{align}
\Bra{\psi(0)}b_n^+b_n\Ket{\psi(0)} = \nonumber\\
\Bra{\psi_0}(\sum_l U^l_n a_l^+(t) + V^l_n a_l(t))(\sum_m U_n^m a_m(t) + V_n^m a_m^+(t))\Ket{\psi_0}
\end{align}

or

\begin{flalign}
\Bra{\psi(0)}b_n^+b_n\Ket{\psi(0)} = \nonumber\\
\Bra{\psi_0}(\sum_l U^l_n a_l^+(t) + V^l_n a_l(t))(\sum_m U_n^m a_m(t) + V_n^m a_m^+(t))\Ket{\psi_0}
\end{flalign}

I get the same output:

With the code:

\begin{gather}
\Bra{\psi(0)}b_n^+b_n\Ket{\psi(0)} = \nonumber\\
\Bra{\psi_0}(\sum_l U^l_n a_l^+(t) + V^l_n a_l(t))(\sum_m U_n^m a_m(t) + V_n^m a_m^+(t))\Ket{\psi_0}
\end{gather}

I get:

With the code,

\begin{multline}
\Bra{\psi(0)}b_n^+b_n\Ket{\psi(0)} = \\
\Bra{\psi_0}(\sum_l U^l_n a_l^+(t) + V^l_n a_l(t))(\sum_m U_n^m a_m(t) + V_n^m a_m^+(t))\Ket{\psi_0}
\end{multline}

I get:

But what I want is (image edited with paint):

Can someone help me to get that?. Thanks.

1
  • 3
    (1) Welcome, (2) on this site we prefer full minimal examples, not sniplet like this where we have to add code in order for us to test your code. (3) In the align based constructions you need to specify an alignment point using &, (4) in general you'd break the line before = not after, if = or say + ends the like it is easily overlooked.
    – daleif
    Dec 8, 2015 at 12:23

2 Answers 2

3

You just have to add a pair of &s to the flalign environment:

\documentclass{article}
\usepackage{amsmath, braket}
\usepackage[showframe]{geometry} 

\begin{document}

\begin{flalign}
 & \Bra{\psi(0)}b_n^+b_n\Ket{\psi(0)} = & \nonumber\\
 & \Bra{\psi_0}(\sum_l U^l_n a_l^+(t) + V^l_n a_l(t))(\sum_m U_n^m a_m(t) + V_n^m a_m^+(t))\Ket{\psi_0}
\end{flalign}

\end{document} 

enter image description here

1
  • That works perfect!!, Thanks a lot by your quick answer :)
    – user93741
    Dec 8, 2015 at 12:34
1

You need & in front of the two parts; I also suggest using \Braket, although the delimiters seem a bit too big.

\documentclass{article}
\usepackage{amsmath,braket}

\begin{document}

\begin{align}
&\Bra{\psi(0)}b_n^+b_n\Ket{\psi(0)} = \nonumber\\
&\Bra{\psi_0}(\sum_l U^l_n a_l^+(t) + V^l_n a_l(t))(\sum_m U_n^m a_m(t) + V_n^m a_m^+(t))\Ket{\psi_0}
\end{align}

\begin{align}
&\Braket{\psi(0) | b_n^+b_n | \psi(0)} = \nonumber\\
&\Braket{\psi_0 | \Bigl(\sum_{\smash{l}} U^l_n a_l^+(t) + V^l_n a_l(t)\Bigr)
                  \Bigl(\sum_{\smash{m}} U_n^m a_m(t) + V_n^m a_m^+(t)\Bigr)
                | \psi_0}
\end{align}

\end{document}

enter image description here

A different strategy is using split, that will center the equation number (but will honor the tbtags option to amsmath).

\documentclass{article}
\usepackage{amsmath,braket}

\begin{document}

\begin{equation}
\begin{split}
&\Bra{\psi(0)}b_n^+b_n\Ket{\psi(0)} = \\
&\Bra{\psi_0}(\sum_l U^l_n a_l^+(t) + V^l_n a_l(t))(\sum_m U_n^m a_m(t) + V_n^m a_m^+(t))\Ket{\psi_0}
\end{split}
\end{equation}

\begin{equation}
\begin{split}
&\Braket{\psi(0) | b_n^+b_n | \psi(0)} =\\
&\Braket{\psi_0 | \Bigl(\sum_{l} U^l_n a_l^+(t) + V^l_n a_l(t)\Bigr)
                  \Bigl(\sum_{m} U_n^m a_m(t) + V_n^m a_m^+(t)\Bigr)
                | \psi_0}
\end{split}
\end{equation}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .