移动方程的编号

移动方程的编号

在此处输入图片描述您好,您能将我的表达式的编号放在分数后的一行末尾吗?提前谢谢

\begin{equation} \label{eq1}
\begin{split}
t_{j,\text{same rode}} = \ & \frac{\pm\sqrt{2\cdot accel_j \cdot d^{connection}_{j} + speed_j^2} - speed_j}{accel_j} = \\ 
        = &  \frac{\sqrt{2\cdot accel_j \cdot d^{connection}_{j} + speed_j^2} - speed_j}{accel_j} = \\
        = &  \frac{\sqrt{2\cdot accel_j \cdot \sqrt{\biggr(y_0 \pm r - (y_j \pm d_j^{\text{while waiting 0}})\biggl)^2} + speed_j^2} - speed_j}{accel_j} 
\end{split}
\end{equation}

答案1

\mathrlap以下是使用from 命令mathtoolsfleqnfromm 环境的解决方案nccmath。我为加速度、速度等定义了一些命令,因此它们看起来不像变量的乘积,并更改了分隔符大小:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools, nccmath}

\newcommand{\accel}{\mathrm{accel}}
\newcommand{\connect}{\mathrm{connection}}
\newcommand{\speed}{\mathrm{speed}}

\begin{document}

\begin{fleqn}
  \begin{equation} \label{eq1}
    \begin{split}
      \MoveEqLeft\mathrlap{t_{j,\text{same rode}} =}\\
      \quad & = \frac{\pm\sqrt{2 \cdot \accel_j \cdot d^\connect_{j} + \speed_j^2} - \speed_j}{\accel_j} = \\
      & = \frac{\sqrt{2 \cdot \accel_j \cdot d^{\connect}_{j} + \speed_j^2} - \speed_j}{\accel_j} = \\
      & =\mathrlap{\frac{\sqrt{2 \cdot \accel_j \cdot \sqrt{\Bigr(y_0 \pm r - \bigl(y_j \pm d_j^{\text{while waiting 0}}\bigr)\Bigl)^2} + \speed_j^2} - \speed_j}{\accel_j}}
    \end{split}
  \end{equation}
\end{fleqn}

\end{document} 

在此处输入图片描述

答案2

我会假设用(绝对值)替换\sqrt{(...)^2}第三行的复合表达式是可以的。|...|

在下面的例子中,我使用align环境而不是嵌套的equation/split环境,以便更容易地将方程编号放在最后一行。

在此处输入图片描述

\documentclass{article}
\usepackage{mathtools} % for '\DeclarePairedDelimiter' directive; loads 'amsmath'
\newcommand\vn[1]{\mathit{#1}} % macro to typeset names of variables
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} % absolute value

\begin{document}
\begin{align} 
t_{j,\text{same rode}} 
&= \frac{\pm\sqrt{2\, \vn{accel}_j \, d^{\,\text{connection}}_{j} 
   + \vn{speed}_j^2} - \vn{speed}_j}{\vn{accel}_j} \notag\\ 
&=  \frac{\sqrt{2\, \vn{accel}_j \, d^{\,\text{connection}}_{j} 
   + \vn{speed}_j^2} - \vn{speed}_j}{\vn{accel}_j} \notag\\
&=  \frac{\sqrt{2\, \vn{accel}_j \, 
    \abs[\big]{y_0 \pm r - \bigl( y_j \pm d_j^{\,\text{while waiting 0}} \bigr)} 
   + \vn{speed}_j^2} - \vn{speed}_j}{\vn{accel}_j} \label{eq1}
\end{align}
\end{document}

相关内容