带有文本和数学的方程式

带有文本和数学的方程式

这与我在这里提出的问题相关:

仅包含文本的方程式

基本上,我想要一个包含大量文本和一些数学的方程式。我不想使用,\mbox因为文本太多,可能会超出范围。在链接的问题中,提供了一个解决方案,\parbox但我想在中间使用数学。

例如:

\begin{equation}\label{key}
  The product of two complex numbers z_1,z_2\in\mathbb{C} is given by the vector whose
  angle is the sum of the angles of the two complex numbers, 
  i.e. arz(z_1z_2)=arg(z_1)+arg(z_2) and whose magnitude is the product of the          
  magnitudes of the two complex numbers, i.e. |z_1z_2|=|z_1||z_2|
\end{equation}

我如何实现这个目标?

答案1

也许你可以做到这一点。

\documentclass{article}
\usepackage{amsmath}   %%% habitual addition
\usepackage{amsfonts}
\usepackage{calc}
\newlength{\mylen}
\setlength{\mylen}{\widthof{(99)}}
\begin{document}
  \begin{equation}\label{key}
    \left.\begin{minipage}{\dimexpr\textwidth-2\mylen\relax}
            The product of two complex numbers $z_1$, $z_2\in\mathbb{C}$ is given by the vector whose
            angle is the sum of the angles of the two complex numbers,
            i.e. $\arg(z_1z_2)=\arg(z_1)+\arg(z_2)$ and whose magnitude is the product of the
            magnitudes of the two complex numbers, i.e. $|z_1z_2|=|z_1||z_2|$
          \end{minipage}
    \right\}
 \end{equation}
\end{document}

在此处输入图片描述

同样也可以做到\parbox

答案2

所讨论的“等式”不仅包含一个,而且包含许多人会将其解释为方程式的实体;此外,文本和方程式都非常重要。因此,我认为,如果您选择类似定理的环境来排版材料,而不是坚持认为它“只是一个方程式”,那么您(以及您的论文的读者)会更好。

这个环境——我们称之为陈述为了具体起见——可以轻松进行交叉引用。如果您愿意,可以使用计数器对环境equation进行编号statement。下面给出了此用法的一个示例。

在此处输入图片描述

\documentclass{article}
\usepackage{amssymb,ntheorem}
\usepackage[noabbrev]{cleveref} % for "clever" cross-references
\theorembodyfont{\upshape} % choose \itshape if you prefer
\newtheorem{statement}[equation]{Statement}
\begin{document}
An equation:
\begin{equation}\label{eq:pyth}
a^2+b^2=c^2
\end{equation}

\begin{statement}\label{complex-prod}
The product of two complex numbers $z_1,z_2\in\mathbb{C}$ is given by the vector whose
  angle is the sum of the angles of the two complex numbers, 
  i.e.\ $\arg(z_1z_2)=\arg(z_1)+\arg(z_2)$ and whose magnitude is the product of the          
  magnitudes of the two complex numbers, i.e.\ $|z_1z_2|=|z_1||z_2|$.
\end{statement}

Another equation:
\begin{equation}\label{eq:euler}
\exp(i\pi)-1=0
\end{equation}

As was shown in \cref{eq:euler,complex-prod,eq:pyth}, \ldots

\end{document} 

相关内容