1

I wanna write a long equation in for a 2-column template of a paper. I used the aligned command to do that, but it doesn't work.

I attache the target equation I am trying to obtain.

enter image description here

Here is my try:

 \begin{equation}
\begin{aligned}
 L ( \mathbf { m } ) = & k \exp \left( - \frac { 1 } { 2 } ( \mathbf { g } ( \mathbf { m } ) - \mathbf { d } _ { \mathrm { obs } } - \mathbf { d } _ { D } ) ^ { t } \mathbf { C } _ { D } ^ { - 1 }  ( \mathbf { g } ( \mathbf { m } ) \\  
 & - \mathbf { d } _ { \mathrm { obs } } - \mathbf { d } _ { D })\right)
 \end{aligned}
\end{equation}
4

The problem is that the \left( \right) pair is split over two lines. Either add some dummy closing and opening macros \right. and \left. at the end and start of the line or manually choose the size (I'd recommend the later because automatically resizes brackets are often wrong)

Dummy macros:

\documentclass[twocolumn]{article}

\usepackage{mathtools}

\begin{document}

 \begin{equation}
\begin{aligned}
 L ( \mathbf { m } ) = 
    & k \exp \left( - \frac { 1 } { 2 } ( \mathbf { g } ( \mathbf { m } ) - \mathbf { d } _ { \mathrm { obs } } - \mathbf { d } _ { D } ) ^ { t } \mathbf { C } _ { D } ^ { - 1 }  ( \mathbf { g } ( \mathbf { m } ) \right. \\  
    & \left. - \mathbf { d } _ { \mathrm { obs } } - \mathbf { d } _ { D }) \vphantom{\frac { 1 } { 2 }} \right)
 \end{aligned}
\end{equation}

\end{document}

Manual size:

\documentclass[twocolumn]{article}

\usepackage{mathtools}

\begin{document}

 \begin{equation}
\begin{aligned}
 L ( \mathbf { m } ) = 
    & k \exp \biggl( - \frac { 1 } { 2 } ( \mathbf { g } ( \mathbf { m } ) - \mathbf { d } _ { \mathrm { obs } } - \mathbf { d } _ { D } ) ^ { t } \mathbf { C } _ { D } ^ { - 1 }  ( \mathbf { g } ( \mathbf { m } )  \\  
    & - \mathbf { d } _ { \mathrm { obs } } - \mathbf { d } _ { D })\biggr)
 \end{aligned}
\end{equation}



\end{document}
2

i would rewrite your equation in the following more compact (and meaningful) form:

enter image description here

\documentclass[twocolumn]{article}
\usepackage{mathtools}

\usepackage{lipsum}% for dummy text
\begin{document}
\lipsum[1]
 \begin{equation}
 L(\mathbf{m}) =
    k \exp\Bigl(- \tfrac{1}{2}\bigl(\mathbf{A}(\mathbf{m}\bigr)^{t}
        \mathbf{C}_{D}^{-1}\bigl(\mathbf{A}(\mathbf{m}\bigr)\Bigr)
\end{equation}
where $\mathbf{A}(\mathbf{m}) =
       \mathbf{g}(\mathbf{m}) - \mathbf{d}_{\mathrm{obs}} - \mathbf{d}_{D}$.

\lipsum[2]
\end{document}
1

Two variants, one with a different alignment, the other with multline. I used the medium-sized fraction command for the fractional coefficient, as I think it looks better than the full \displaystyle:

\documentclass[twocolumn]{article}

\usepackage{mathtools, nccmath}
\usepackage{lipsum}

\begin{document}

\lipsum[11]
 \begin{equation}
\begin{aligned}
 L (\mathbf {m}) =
 k \exp \Bigl(&\medmath{-\frac {1} {2}}\bigl(\mathbf {g}(\mathbf {m}) - \mathbf {d}_{ \mathrm {obs}} - \mathbf {d}_{D} \bigr)^{\!t}\cdot \\%
 &\mathbf{C}_{D}^{-1} \bigl(\mathbf{g}(\mathbf{m}) - \mathbf{d} _{\mathrm{obs}} - \mathbf{d}_{D}\bigr) \Bigr)
 \end{aligned}
\end{equation}
\lipsum[13]
\begin{multline}
 L (\mathbf {m}) =
 k \exp \Bigl( \medmath{-\frac {1} {2}}\bigl(\mathbf {g} (\mathbf {m}) - \mathbf {d}_{ \mathrm {obs}} - \mathbf {d}_{D} \bigr)^{\!t}\cdot \\%
 \mathbf {C}_{D}^{- 1} \bigl(\mathbf{g} (\mathbf{m}) - \mathbf{d}_{\mathrm{obs}} - \mathbf {d}_{D}\bigr)\Bigr)
 \end{multline}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.