我尝试解决以下问题一段时间,但尚未找到解决方案。我想垂直对齐两个 \rbraces。此代码
\begin{align}
L = &\left. \text{short eq} \right\rbrace &&\text{description 1} \\
&\left. \begin{aligned}
\text{very long equation}\\
\text{over multiple lines}
\end{aligned}
\right\rbrace &&\text{description 2}
\end{align}
生产
不过,我想调整一下它们之间的支撑
我希望有人能帮助我。谢谢!
答案1
像这样吗?
\documentclass{article}
\usepackage{amsmath} % for 'align' environment and '\text' macro
\newlength\mylen % create a "length" variable
\settowidth\mylen{very long equation} % calculate default width of '\mybox'
\newcommand\mybox[2][\mylen]{\parbox{#1}{\raggedright #2}}
\begin{document}
\begin{align}
L = &\left.\mybox{short eq}\right\rbrace &&
\text{description 1} \\
&\left.\mybox{very long equation over multiple lines}\right\rbrace &&
\text{description 2}
\end{align}
\end{document}
答案2
这样的事情怎么样?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{alignedat}{4}
L = & \text{short eq } && \left. \text{ } \right\rbrace && \qquad \text{description 1} \\
&\begin{aligned}
&\text{22244 very long equation 5555}\\
&\text{over multiple lines }
\end{aligned} && \left.
\begin{aligned}
\text{ }\\
\text{ }
\end{aligned} \right\rbrace && \qquad \text{description 2}
\end{alignedat}
\end{equation}
\end{document}
所有的线都被视为一个方程。我从下面的帖子中借用了这个想法。