
我嘗試解決以下問題一段時間,但尚未找到解決方案。我想垂直對齊兩個 \r大括號。這段程式碼
\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}
所有的線都被視為一個方程式。我從下面的帖子中藉用了這個想法。