1

I have an equation that I need to split, but I want the two resulting lines to be alligned at the opposite side of the column.

I am using \begin{split} to split my line:

\documentclass[a4paper,10pt]{article}

\usepackage[T1]{fontenc}
\usepackage{amsmath, amsthm, amssymb}
\usepackage[ansinew]{inputenc}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage[margin=20mm,right=20mm]{geometry}

\begin{document}
\begin{multicols}{2}
\lipsum[4]
\begin{equation}
    \begin{split}
        \frac{1}{2\Delta t^2}\left\Vert\mathbf{M}^\frac{1}{2}\left(\mathbf{x} - \mathbf{s}^{(n)}\right)\right\Vert_F^2 \\
        + \sum_i \frac{w_i}{2}\left\Vert \mathbf{A}_i\mathbf{S}_i\mathbf{x}-\mathbf{B}_i\mathbf{p}_i \right\Vert_F^2 + \delta_{C_i}(\mathbf{p}_i),
    \end{split}
\end{equation}
\lipsum[1]
\end{multicols}
\end{document}

The resulting document looks like this: enter image description here What I want to achieve is that the first line is aligned left, while the second line is aligned right: enter image description here How can I achieve this behavior?

2
  • 1
    Welcome to TeX.SX. Try the multline environment from amsmath package. Commented Jul 16, 2016 at 11:22
  • @StefanPinnow Thank you! Works like a charm. If you post your solution as an answer I will accept it.
    – maddin45
    Commented Jul 16, 2016 at 11:31

1 Answer 1

2

As already stated in the comment below the question simply use the multline environment from the amsmath package.

Here is an MWE of your given equation.

\documentclass[a5paper]{article}
\usepackage{amsmath}
\begin{document}
    \begin{multline}
        \frac{1}{2\Delta t^2}\left\Vert\mathbf{M}^\frac{1}{2}\left(\mathbf{x}
            - \mathbf{s}^{(n)}\right)\right\Vert_F^2 \\
        + \sum_i \frac{w_i}{2}\left\Vert \mathbf{A}_i\mathbf{S}_i\mathbf{x}
            -\mathbf{B}_i\mathbf{p}_i \right\Vert_F^2 + \delta_{C_i}(\mathbf{p}_i),
    \end{multline}
\end{document}

You must log in to answer this question.

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