当 LaTeX 编译它时,它看起来很糟糕。处理器将方程式分隔开,因此它看起来并不需要我的目的。
这是代码...
\begin{displaymath}
E[W_{A}^{s_2}] = \underbrace{\underbrace{E[N_{A}^{s_2}]}_{\mbox{\tiny
Number of waiting class $A$ jobs}} \cdot
\underbrace{E[X_2]}_{\mbox{\tiny Mean service time at
\$s_2$}}}_{\mbox{Mean time needed to serve the
customers ahead in the queue}} +
\underbrace{E[R_{A}^{s_2}]}_{\mbox{\tiny Unfinished work at $s_2$}}
\end{displaymath}
我想要的是\underbrace{E[N_{A}^{s_2}]}_{\mbox{\tiny Number of waiting \\ class $A$ jobs}} \cdot \underbrace{E[X_2]}_{\mbox{\tiny Mean service time at $s_2$}}
等式的各个部分彼此非常接近。
我怎样才能做到这一点?
谢谢。
答案1
也许你喜欢:
可以看出,通过使用substack
provided by amsmath
(或mathtools
which call amsmath
),大括号内的长文本被分成更多行:
\documentclass[preview, margin=3mm]{standalone}
\usepackage{mathtools}
\begin{document}
\[
E[W_{A}^{s_2}]
= \underbrace{%
\underbrace{E[N_{A}^{s_2}]}_{\substack{\text{Number of}\\
\text{ waiting class}\\
\text{$A$ jobs}}}
\cdot
\underbrace{E[X_2]}_{\substack{\text{Mean service}\\
\text{time at $s_2$}}}
}_{\substack{\text{Mean time needed}\\
\text{to serve the customers}\\
\text{ ahead in the queue}}}
+
\underbrace{E[R_{A}^{s_2}]}_{\substack{\text{Unfinished}\\
\text{work at $s_2$}}}
\]
\end{document}