如何将等号附近的方程式对齐,并在其间插入文字行?

如何将等号附近的方程式对齐,并在其间插入文字行?

我想对齐“=”符号周围未编号的等式,这些等式之间有一两行语句。此外,我还希望它们居中。以下是我在代码中执行的操作:

\begin{align*}
T & = \frac{0.161V}{\sum as}\\
\sum as & = \frac{0.161V}{T}\\
\end{align*}
Substituting the known values, we get,\\
\begin{align*}
\sum as & = \frac{0.161 \times 120000}{1.5}\\
\sum as & = 13360 \text{ O W U}
\end{align*}
The total absorption of the hall is 13,360 open window units (O W U)\\
Therefore, the average absorbing power of the surface\\
\begin{align*}
a & = \frac{\sum as}{\sum s}\\
\implies a & = \frac{13360}{25000}\\
\implies a &=0.5344 \text{sabine}
\end{align*}
The average absorbing power of the surface is 0.5344 sabine.

上面的代码给出的输出中等号未对齐。我希望它们居中并对齐。此外,等式位于语句的下一行。我希望它们位于一行中。请帮忙。

答案1

解决方案已经在评论中提到了。我siunitx在这里介绍了这个很棒的包,因为它可以更好地打印数字,并正确设置单位间距。我还为您声明了两个新单位。如果您稍后决定应该\text{sabine}变成\mathscr{S}或其他,您只需进行一次编辑即可为整个文档更改此设置。

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools}
\usepackage{siunitx}
\DeclareSIUnit{\sabine}{\text{sabine}}
\DeclareSIUnit{\owu}{\text{OWU}}

\begin{document}
\begin{align*}
    T &= \frac{0.161 V}{\sum as}\\
    \sum as &= \frac{0.161 V}{T}\\
    \intertext{Substituting the known values, we get,}
    \sum as &= \frac{0.161 \times 120000}{1.5}\\
    \sum as &= \SI{13360}{\owu}
    \intertext{The total absorption of the hall is \num{13360} open window units (\si{\owu}).
    Therefore, the average absorbing power of the surface is:}
    a & = \frac{\sum as}{\sum s}\\
     \smashoperator{\implies} a &= \frac{13360}{25000}\\
     \smashoperator{\implies} a &= \SI{0.5344}{\sabine}
\end{align*}
The average absorbing power of the surface is \SI{0.5344}{\sabine}.
\end{document}

在此处输入图片描述

相关内容