当我使用 & 符号对齐定位时,下划线功能会失效。有没有一种(简单的)方法可以完全为最后一行数学线加下划线?
\documentclass[14pt,a4paper,headlines=6,headinclude=true]{scrartcl}
\usepackage{amsmath,amssymb,stmaryrd}
\begin{document}
\begin{align*}
\mathcal{H} (c, K, \lambda, t) &= \frac{c^{1-\frac{1}{\sigma} } -1}{1 - \frac{1}{\sigma}} + \lambda \cdot \left( r \cdot K + w \cdot L_Y + \Pi_x \cdot A - c \cdot L \right) \\
\Leftrightarrow \frac{\dot c}{c} &= \sigma \cdot \left( r - \rho - n \right) \tag{25}
\end{align}
\end{document}
例子:
答案1
您可以为整个等式划线或者为其着色.....使用tcolorbox
。
\documentclass[14pt,a4paper,headlines=6,headinclude=true]{scrartcl}
\usepackage{amsmath,amssymb,stmaryrd}
\usepackage{empheq}
\usepackage[theorems,skins]{tcolorbox}
\newtcbox{\underlined}[1][]{nobeforeafter,math upper,tcbox raise base,
enhanced jigsaw,arc=0pt,boxrule=0pt,bottomrule=1pt,colback=white,colframe=black,
#1}
\begin{document}
\begin{empheq}[box=\underlined]{align}
\mathcal{H} (c, K, \lambda, t) &= \frac{c^{1-\frac{1}{\sigma} } -1}{1 - \frac{1}{\sigma}} + \lambda \cdot \left( r \cdot K + w \cdot L_Y + \Pi_x \cdot A - c \cdot L \right) \notag\\
\Leftrightarrow \frac{\dot c}{c} &= \sigma \cdot \left( r - \rho - n \right)
\end{empheq}
\end{document}
答案2
这就是你想要的吗?经过多次幻觉,看起来是对的。
\begin{align*}
\mathcal{H} (c, K, \lambda, t) &= \frac{c^{1-\frac{1}{\sigma} } -1}{1 - \frac{1}{\sigma}} + \lambda \cdot \left( r \cdot K + w \cdot L_Y + \Pi_x \cdot A - c \cdot L \right) \\
\rlap{%
\underline{%
\vphantom{$\displaystyle\frac{\dot c}{c}$}%
\hphantom{$\Leftrightarrow \frac{\dot c}{c} = \sigma \cdot \left( r - \rho - n \right)$}%
}%
}%
\Leftrightarrow \frac{\dot c}{c} &= \sigma \cdot \left( r - \rho - n \right)
\tag{25}
\end{align*}