将长表达式左移到环境中

将长表达式左移到环境中

在环境中移动的可能替代方案有哪些,第二个等式都在左边?这是我的 MWE:

在此处输入图片描述

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}

\begin{document}
\begin{align*}
F_{x}+q\left[\frac{\partial A_{x}}{\partial t}+\frac{\partial A_{x}}{\partial x}\frac{dx}{dt}+\frac{\partial A_{x}}{\partial y}\frac{dy}{dt}+\frac{\partial A_{x}}{\partial z}\frac{dz}{dt}\right]= -q\frac{\partial\varphi}{\partial x}+q u_{x}\frac{\partial A_{x}}{\partial x}+q u_{y}\frac{\partial A_{y}}{\partial x}+q u_{z}\frac{\partial A_{z}}{\partial x}& \notag\\
\intertext{cioe'}
F_{x}=q\left\{ -\left[\frac{\partial\varphi}{\partial x}+\frac{\partial A_{x}}{\partial t}\right]+u_{y}\left[\frac{\partial A_{y}}{\partial x}-\frac{\partial A_{x}}{\partial y}\right]-u_{z}\left[\frac{\partial A_{x}}{\partial z}-\frac{\partial A_{z}}{\partial x}\right]\right\}&.\notag\\
\end{align*}
\end{document}

答案1

没有理由在align不对齐的情况下使用。

我会选择标准

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}

\begin{document}

\begin{equation*}
F_{x}+q\left[\frac{\partial A_{x}}{\partial t}+\frac{\partial A_{x}}{\partial x}\frac{dx}{dt}+\frac{\partial A_{x}}{\partial y}\frac{dy}{dt}+\frac{\partial A_{x}}{\partial z}\frac{dz}{dt}\right]= -q\frac{\partial\varphi}{\partial x}+q u_{x}\frac{\partial A_{x}}{\partial x}+q u_{y}\frac{\partial A_{y}}{\partial x}+q u_{z}\frac{\partial A_{z}}{\partial x}
\end{equation*}
cioè
\begin{equation*}
F_{x}=q\left\{ -\left[\frac{\partial\varphi}{\partial x}+\frac{\partial A_{x}}{\partial t}\right]+u_{y}\left[\frac{\partial A_{y}}{\partial x}-\frac{\partial A_{x}}{\partial y}\right]-u_{z}\left[\frac{\partial A_{x}}{\partial z}-\frac{\partial A_{z}}{\partial x}\right]\right\}.
\end{equation*}

\end{document}

如果要对齐两者F_x,方法是将对齐点固定在它们上:

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}

\begin{document}

\begin{align*}
&F_{x}+q\left[\frac{\partial A_{x}}{\partial t}+\frac{\partial A_{x}}{\partial x}\frac{dx}{dt}+\frac{\partial A_{x}}{\partial y}\frac{dy}{dt}+\frac{\partial A_{x}}{\partial z}\frac{dz}{dt}\right]= -q\frac{\partial\varphi}{\partial x}+q u_{x}\frac{\partial A_{x}}{\partial x}+q u_{y}\frac{\partial A_{y}}{\partial x}+q u_{z}\frac{\partial A_{z}}{\partial x}\\
\intertext{cioè}
&F_{x}=q\left\{ -\left[\frac{\partial\varphi}{\partial x}+\frac{\partial A_{x}}{\partial t}\right]+u_{y}\left[\frac{\partial A_{y}}{\partial x}-\frac{\partial A_{x}}{\partial y}\right]-u_{z}\left[\frac{\partial A_{x}}{\partial z}-\frac{\partial A_{z}}{\partial x}\right]\right\}.
\end{align*}

\end{document}

请注意,这\notag是多余的,因为align*首先没有对方程进行编号。还要记住必须有不是为尾随的\\,这会导致不必要的垂直空间(以及带有的虚假方程数align)。


这是一个完善的版本,用宏代替了所有这些\partial命令,并且有两个选项。

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

\newcommand{\der}[2]{%
  \frac{d#1}{d#2}%
}
\newcommand{\pder}[2]{%
  \frac{\partial #1}{\partial #2}%
}

\begin{document}

\section{\texttt{align}}

\begin{align*}
&F_{x}+q\left[\pder{A_{x}}{t}+\pder{A_{x}}{x}\der{x}{t}
      +\pder{A_{x}}{y}\frac{dy}{dt}+\pder{A_{x}}{z}\der{z}{t}\right]
     =-q\pder{\varphi}{x}+q u_{x}\pder{A_{x}}{x}+q u_{y}\pder{A_{y}}{x}
      +q u_{z}\pder{A_{z}}{x}
\intertext{cioè}
&F_{x}=
  q\left\{
    -\left[\pder{\varphi}{x}+\pder{A_{x}}{t}\right]
    +u_{y}\left[\pder{A_{y}}{x}-\pder{A_{x}}{y}\right]
    -u_{z}\left[\pder{A_{x}}{z}-\pder{A_{z}}{x}\right]
  \right\}.
\end{align*}

\section{\texttt{equation}}

\begin{equation*}
F_{x}+q\left[\pder{A_{x}}{t}+\pder{A_{x}}{x}\frac{dx}{dt}
     +\pder{A_{x}}{y}\frac{dy}{dt}+\pder{A_{x}}{z}\frac{dz}{dt}\right]
    =-q\pder{\varphi}{x}+q u_{x}\pder{A_{x}}{x}+q u_{y}\pder{A_{y}}{x}
     +q u_{z}\pder{A_{z}}{x}
\end{equation*}
cioè
\begin{equation*}
F_{x}=
  q\left\{
    -\left[\pder{\varphi}{x}+\pder{A_{x}}{t}\right]
    +u_{y}\left[\pder{A_{y}}{x}-\pder{A_{x}}{y}\right]
    -u_{z}\left[\pder{A_{x}}{z}-\pder{A_{z}}{x}\right]
  \right\}.
\end{equation*}

\end{document}

在此处输入图片描述

答案2

我会将两个&对齐点放在每行的最开始处。

另外两点说明:(a)将&符号放在每行的最末端相当于根本不提供任何对齐点,这反过来意味着方程式将在右端对齐。(b)在环境\notag中使用这些指令时,除了造成代码混乱之外,什么也不做align*

在此处输入图片描述

\documentclass[a4paper,12pt]{article}
\usepackage[italian]{babel}
\usepackage[margin=2.5cm]{geometry} % choose suitable page size parameters
\usepackage{mathtools}

\begin{document}
\begin{align*}
&F_{x}+q\left[\frac{\partial A_{x}}{\partial t}
  +\frac{\partial A_{x}}{\partial x}\frac{dx}{dt}
  +\frac{\partial A_{x}}{\partial y}\frac{dy}{dt}
  +\frac{\partial A_{x}}{\partial z}\frac{dz}{dt}\right]= 
  -q\frac{\partial\varphi}{\partial x}
  +q u_{x}\frac{\partial A_{x}}{\partial x}
  +q u_{y}\frac{\partial A_{y}}{\partial x}
  +q u_{z}\frac{\partial A_{z}}{\partial x}\\
\intertext{cio\`e}
&F_{x}=q\left\{ -\left[\frac{\partial\varphi}{\partial x}
  +\frac{\partial A_{x}}{\partial t}\right]
  +u_{y}\left[\frac{\partial A_{y}}{\partial x}
  -\frac{\partial A_{x}}{\partial y}\right]
  -u_{z}\left[\frac{\partial A_{x}}{\partial z}
  -\frac{\partial A_{z}}{\partial x}\right]\right\}.
\end{align*}
\end{document}

相关内容