LaTeX 数学方程式中符号的左对齐定义?

LaTeX 数学方程式中符号的左对齐定义?

我有一个方程式,想在方程式下方添加一个“哪里”块来解释所使用的变量。我想使用类似于上一个示例的内容这个答案但是我希望“where”块能够在文本主体的左侧对齐(按原样,即在“:”上对齐) - 适应周围的文本。

我希望在不离开数学环境的情况下做到这一点。

这是我的 MWE:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac velit dolor.
Nulla nunc dolor, commodo sed consectetur ac, dapibus malesuada odio.
Mauris porta libero eget nisi placerat quis bibendum tellus fermentum. It is therefore
possible to define the relationship
\begin{gather}
  x >> R + E,\\\notag
  \begin{split}
    \text{where } R &: \text{Racoon,}\\
    E &: \text{Elephant}
  \end{split}\hfill\mbox{}
\end{gather}
Sed suscipit tristique laoreet.
Nulla mi orci, rutrum sed dapibus sed, elementum nec lacus.
Phasellus id tellus mi, at rutrum justo. Nullam eget turpis justo, ullamcorper
pretium mauris.  It is therefore
possible to define the relationship
\begin{gather}
  x \gg R + E,\\\notag
  \begin{alignedat}{2}
    &\text{where} &\quad R &: \text{Racoon,}\\
    &     &E &: \text{Elephant}
  \end{alignedat}\hfill\mbox{}
\end{gather}
Sed suscipit tristique laoreet.
Nulla mi orci, rutrum sed dapibus sed, elementum nec lacus.
Phasellus id tellus mi, at rutrum justo. Nullam eget turpis justo, ullamcorper
pretium mauris.  It is therefore
possible to define the relationship
\end{document}

编辑:根据 daleif 的回答,我扩展了 MWE。

答案1

这是一种可能性,但是在我看来,你想要的并不是很好。

\documentclass{article}
\usepackage{amsmath}

\newenvironment{where}[1][where]
 {\vadjust pre{\vskip-\belowdisplayskip}$\!\begin{aligned}\text{#1 }}
 {\end{aligned}$\\*[\belowdisplayskip]}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac velit dolor.
Nulla nunc dolor, commodo sed consectetur ac, dapibus malesuada odio.
Mauris porta libero eget nisi placerat quis bibendum tellus fermentum. It is therefore
possible to define the relationship
\begin{gather}
x \gg R + E,
\end{gather}
\begin{where}
R &: \text{Racoon,}\\
E &: \text{Elephant}
\end{where}
Sed suscipit tristique laoreet.
Nulla mi orci, rutrum sed dapibus sed, elementum nec lacus.
Phasellus id tellus mi, at rutrum justo. Nullam eget turpis justo, ullamcorper
pretium mauris.  It is therefore
possible to define the relationship
\end{document}

在此处输入图片描述

答案2

我会做你已经在做的事情,但使用两个对齐点

\begin{gather}
  x \gg R + E,\\\notag
  \begin{alignedat}{2}
    &\text{where} &\quad R &: \text{Racoon,}\\
                  &     &E &: \text{Elephant}
  \end{alignedat}
\end{gather}

还请注意使用\gg

相关内容