# How can I nicely align a single split equation?

I'd like to align my equation to that it (and its label) fit on three lines.

MWE

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{xfrac}
\usepackage{transparent}
\usepackage{mathtools}

\usepackage[a4paper]{geometry}
\geometry{top=1.0in, bottom=1.0in,
left=1.0in, right=1.0in}

\usepackage[usenames,dvipsnames]{color}

\newcommand{\Cline}[2][red]{
\text{\oalign{$#2$\cr\color{#1}\leaders\hrule height 0.80pt\hfil\cr}}}

\begin{document}

$$\begin{split} R_{\sigma\mu\rho\nu} &= \bar{R}_{\sigma\mu\rho\nu}\\& +\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\mu}h_{\nu\sigma} +\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\sigma} +\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\nu\tau}} -\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\sigma}h_{\mu\nu} -\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\nu}} -\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\nu}h_{\mu\tau}\\& -\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\mu}h_{\rho\sigma} -\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\rho}h_{\tau\sigma} -\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\rho\tau}} +\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\sigma}h_{\mu\rho} +\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\rho}} +\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\rho}h_{\mu\tau}. \end{split}$$

\end{document}


Note that in my actual document, this equation has the number 6.18, as shown below. Here, I've drawn the red lines on where the margins start.

Here is an approximate mock-up of what I'd like:

• Did you try \documentclass[11pt, fleqn]{article}? Or is it just for some equations? Then I suggest you take a look at: tex.stackexchange.com/q/16840 – Count Zero Apr 18 '13 at 13:50
• @CountZero I'd like a local change. – User 17670 Apr 18 '13 at 13:51
• you might enter the left-hand expression as \qquad\llap{$R_{\sigma\mu\rho\nu}$} which will shove it to the left; the \qquad is intended to leave enough space that it doesn't go past the left margin. another option is to use \scalebox. the alignment is meaningful, so it would be a shame to make it less so, just for the sake of an extra line. – barbara beeton Apr 18 '13 at 14:03
• @barbarabeeton Could you provide a MWE please? – User 17670 Apr 18 '13 at 14:11

Two options: one using a multline environment and the other one using flalign (notice the use of \raisetag in the latter):

\documentclass[11pt]{book}
\usepackage[a4paper,showframe]{geometry}
\geometry{top=1.0in, bottom=1.0in,left=1.0in, right=1.0in}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xfrac}
\usepackage{transparent}
\usepackage{mathtools}
\usepackage[usenames,dvipsnames]{color}

\newcommand{\Cline}[2][red]{
\text{\oalign{$#2$\cr\color{#1}\leaders\hrule height 0.80pt\hfil\cr}}}

\begin{document}
\setcounter{chapter}{5}
\chapter{Test}
\setcounter{equation}{17}
\setlength\multlinegap{0pt}
\begin{multline}
R_{\sigma\mu\rho\nu} = \bar{R}_{\sigma\mu\rho\nu}\\
+\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\mu}h_{\nu\sigma}
+\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\sigma}
+\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\nu\tau}}
-\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\sigma}h_{\mu\nu}
-\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\nu}}
-\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\nu}h_{\mu\tau}\\
-\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\mu}h_{\rho\sigma}
-\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\rho}h_{\tau\sigma}
-\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\rho\tau}}
+\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\sigma}h_{\mu\rho}
+\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\rho}}
+\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\rho}h_{\mu\tau}.
\end{multline}

\begin{flalign}
R_{\sigma\mu\rho\nu} &= \bar{R}_{\sigma\mu\rho\nu} &\nonumber \\
&+\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\mu}h_{\nu\sigma}
+\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\sigma}
+\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\nu\tau}}
-\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\sigma}h_{\mu\nu}
-\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\nu}}
-\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\nu}h_{\mu\tau}\nonumber & \\
&-\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\mu}h_{\rho\sigma}
-\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\rho}h_{\tau\sigma}
-\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\rho\tau}}
+\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\sigma}h_{\mu\rho}
+\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\rho}}
+\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\rho}h_{\mu\tau}.&
\raisetag{\baselineskip}
\end{flalign}

\end{document}


The showframe option for geometry only draws a frame as a visual guide.

• Only thing is, my equation is numbered (6.18) and so it makes the third line wonky compared to the second line. – User 17670 Apr 18 '13 at 13:55
• @User17670 please see my updated answer. – Gonzalo Medina Apr 18 '13 at 14:14

here's the adjusted example from the original question, as requested.

unfortunately, with the setup i'm using, there's an option clash with the color package, resulting in output without the desired colors.

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{xfrac}
\usepackage{transparent}
\usepackage{mathtools}

\usepackage[a4paper]{geometry}
\geometry{top=1.0in, bottom=1.0in,
left=1.0in, right=1.0in}

\usepackage[usenames,dvipsnames]{color}

\newcommand{\Cline}[2][red]{
\text{\oalign{$#2$\cr\color{#1}\leaders\hrule height 0.80pt\hfil\cr}}}

\numberwithin{equation}{section}

\begin{document}

\setcounter{section}{6}
\setcounter{equation}{17}

\noindent Here is some text to establish the left margin.
$$\begin{split} \qquad\llap{R_{\sigma\mu\rho\nu}} &= \bar{R}_{\sigma\mu\rho\nu}\\ & +\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\mu}h_{\nu\sigma} +\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\sigma} +\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\nu\tau}} -\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\sigma}h_{\mu\nu} -\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\nu}} -\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\nu}h_{\mu\tau}\\ & -\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\mu}h_{\rho\sigma} -\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\rho}h_{\tau\sigma} -\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\rho\tau}} +\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\sigma}h_{\mu\rho} +\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\rho}} +\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\rho}h_{\mu\tau}. \end{split}$$

\end{document}


sorry about the size; this didn't scale well.

• If you want to, I can upload an image with the original colors. – Gonzalo Medina Apr 18 '13 at 14:32
• @GonzaloMedina -- thanks for the offer, but actually, i like your (accepted) answer better anyhow. i was prepared to delete this one, but someone may get some value from the use of spacing plus \llap. – barbara beeton Apr 18 '13 at 14:34
• +1 Nice. Visually, it's exactly what I was after (see my answer). – User 17670 Apr 18 '13 at 14:41

Here are two suggestions:

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{xfrac}
\usepackage{transparent}
\usepackage{mathtools}

\usepackage[a4paper]{geometry}
\geometry{top=1.0in, bottom=1.0in,
left=1.0in, right=1.0in}

\usepackage[usenames,dvipsnames]{color}

\newcommand{\Cline}[2][red]{
\text{\oalign{$#2$\cr\color{#1}\leaders\hrule height 0.80pt\hfil\cr}}}

\numberwithin{equation}{section}

\begin{document}

\setcounter{section}{6}
\setcounter{equation}{17}

Either you can squeeze the binary operators
$$\begin{split} R_{\sigma\mu\rho\nu} &= \bar{R}_{\sigma\mu\rho\nu}\\ &\quad {+}\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\mu}h_{\nu\sigma} {+}\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\sigma} {+}\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\nu\tau}} {-}\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\sigma}h_{\mu\nu} {-}\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\nu}} {-}\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\nu}h_{\mu\tau}\\ &\quad {-}\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\mu}h_{\rho\sigma} {-}\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\rho}h_{\tau\sigma} {-}\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\rho\tau}} {+}\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\sigma}h_{\mu\rho} {+}\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\rho}} {+}\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\rho}h_{\mu\tau}. \end{split}$$
Or you can name a subexpression
\begin{aligned} R_{\sigma\mu\rho\nu} &= \bar{R}_{\sigma\mu\rho\nu} + S_{\sigma\mu\rho\nu} - S_{\sigma\mu\nu\rho},\\ &\begin{aligned} \text{where}\quad S_{\sigma\mu\rho\nu}=& \tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\mu}h_{\nu\sigma} +\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\sigma} +\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\nu\tau}}\\&\quad -\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\sigma}h_{\mu\nu} -\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\nu}} -\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\nu}h_{\mu\tau}. \end{aligned} \end{aligned}
This assumes $$h_{ab}$$ is symmetric.

\end{document}

• +1 Thanks for the suggestions! The idea of a subexpression never occurred to me, I got too focused on the LaTeX. It's a bit awkward to introduce at this point in the document however, so I've opted for a modified version of Gonzalo's answer. I'll add it in a minute. – User 17670 Apr 18 '13 at 14:30

This is what I went for in the end (a modified version of Gonzalo Medina's great answer):

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xfrac}
\usepackage{transparent}
\usepackage{mathtools}
\usepackage[a4paper]{geometry}
\geometry{top=1.0in, bottom=1.0in,
left=1.0in, right=1.0in}
\usepackage[usenames,dvipsnames]{color}
\newcommand{\Cline}[2][red]{
\text{\oalign{$#2$\cr\color{#1}\leaders\hrule height 0.80pt\hfil\cr}}}
\setcounter{section}{5}
\numberwithin{equation}{section}
\begin{document}
\section{Hello}
\setcounter{equation}{17}
\begin{flalign}
\,\,R_{\sigma\mu\rho\nu} &= \bar{R}_{\sigma\mu\rho\nu} &\nonumber \\
%NOTE THE \,\, TO MOVE THE WHOLE EQUATION TO THE RIGHT A BITPART MAKES THE EQUATION
%NUMBER VERTICALLY CENTRED.
&+\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\mu}h_{\nu\sigma}
+\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\sigma}
+\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\nu\tau}}
-\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\sigma}h_{\mu\nu}
-\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\nu}}
-\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\nu}h_{\mu\tau}\nonumber & \\
&-\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\mu}h_{\rho\sigma}
-\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\rho}h_{\tau\sigma}
-\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\rho\tau}}
+\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\sigma}h_{\mu\rho}
+\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\rho}}
+\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\rho}h_{\mu\tau}.&
\raisetag{1.4cm}
%THIS 1.4cm PART MAKES THE EQUATION NUMBER VERTICALLY CENTRED.
\end{flalign}
\end{document}


Output: