我怎样才能很好地对齐单个分割方程?

我怎样才能很好地对齐单个分割方程?

我想将我的方程式对齐,使其(及其标签)适合三行。

平均能量损失

\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{equation}
\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{equation}

\end{document}

请注意,在我的实际文档中,这个等式的数字为 6.18,如下所示。在这里,我在页边距的起始位置画了红线。

在此处输入图片描述

以下是我想要的近似模型:

在此处输入图片描述

答案1

两个选项:一个使用multline环境,另一个使用(注意后者flalign的使用):\raisetag

\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}

在此处输入图片描述

showframegeometry绘制框架作为视觉指南的选项。

答案2

这是根据要求对原始问题进行调整的示例。

不幸的是,在我使用的设置中,有一个选项与颜色包冲突,导致输出没有所需的颜色。

\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{equation}
\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{equation}

\end{document}

示例代码的输出

抱歉,尺寸太大;扩展性不好。

答案3

以下是两条建议:

示例输出

\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{equation}
\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}
\end{equation}
Or you can name a subexpression
\begin{equation}
  \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}
\end{equation}
This assumes \( h_{ab} \) is symmetric.

\end{document}

答案4

这就是我最终想要的结果(Gonzalo Medina 的精彩答案的修改版本):

\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}

输出:

在此处输入图片描述

相关内容