有时 \makebox 可以给出漂亮的下划线,有时 \parbox 可以实现多行版本。但是如何将两个多行下划线公式标签并排组合并使其看起来美观呢?
\documentclass[15pt, a4paper]{scrartcl}
\usepackage{amsmath,amssymb,stmaryrd}
\usepackage{enumitem}
\begin{document}
\begin{align*}
MR &\stackrel{!}{=} MC \\
&\Leftrightarrow \underbrace{\overline{p}_x = \frac{r}{1-\alpha}}_{\text{\makebox[0pt]{MR from production of intermediate good} } } \stackrel{!}{=} \underbrace{\frac{\partial Y}{\partial K} = (1-\alpha) \cdot \frac{Y}{K}}_{\text{\parbox{15em}{marg. rental cost (opp. costs!) due \\ to perfect competition on \underline{goods market}}}}
\end{align*}
\end{document}
仅使用两个 \parbox 并根据公式调整其大小看起来不太好!结果有 3-4 个换行符。我希望最多将文本设置为两行。
(1)makebox 在公式下给出很好的扩展效果 (2)parbox 支持多行文本
如何将这两种特点结合起来?
非常感谢。
答案1
如果隐藏宽度,则会在没有任何警告的情况下出现过度打印。我不确定在下划线中放置如此多的文本是否真的有效,但有几点建议:
\documentclass[15pt, a4paper]{scrartcl}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
\begin{document}
this
\begin{align*}
MR &\stackrel{!}{=} MC \\
&\Leftrightarrow
\underbrace{\overline{p}_x = \frac{r}{1-\alpha}}_{\text{\shortstack{MR from\\ production of\\ intermediate good}}}
\stackrel{!}{=}
\underbrace{\frac{\partial Y}{\partial K} = (1-\alpha) \cdot \frac{Y}{K}}_{\text{\shortstack{marg. rental cost\\ (opp. costs!)\\ due to perfect\\ competition on \underline{goods market}}}}
\end{align*}
or this
\begin{align*}
MR &\stackrel{!}{=} MC \\
&\Leftrightarrow
\underbrace{\overline{p}_x = \frac{r}{1-\alpha}}_{\dagger}
\stackrel{!}{=}
\underbrace{\frac{\partial Y}{\partial K} = (1-\alpha) \cdot \frac{Y}{K}}_{\ddagger}
\end{align*}
$\dagger$: $MR$ from production of intermediate good.
$\ddagger$: Marg. rental cost (opp. costs!) due to perfect competition on \underline{goods market}
\end{document}