我想偶尔描述一个多行方程,并在相关行旁边添加一些文本。有时行很短(下面有第 10 行)。有时很长(下面有第 9 行)。如果方程或文本很长,结果将无法放在一行中。我尝试使用parbox
和minipage
将文本设置为几行,但我无法让它们在环境中正常工作align
。
这是问题的一个例子。有好的解决办法吗?
\begin{align}
v &= 3^2 e^{2\pi a} e^{2\pi b} & \text{\small replace $3^2$ with $9$, combine exponents, and extend this to pretend it's a really long explanation that takes its time and has a lot of words.}\\
&= 9 e^{2 \pi (a+b)} & \text{\small insert $n$} \\
&= 9 e^{2 n \pi (a+b)} \\
&= 9 e^{2n\pi d}
\end{align}
答案1
我建议采用这种布局,借助以下软件包linegoal
:
\documentclass{article}
\usepackage{linegoal}
\usepackage{amsmath}
\begin{document}
\begin{align}
v &= 3^2 e^{2\pi a} e^{2\pi b} & &\parbox[t]{0.7\linegoal}{\small replace $3^2$ with $9$, combine exponents, and extend this to pretend it's a really long explanation that takes its time and has a lot of words.}\\
&= 9 e^{2 \pi (a+b)} & & \parbox[t]{0.7\linegoal}{\small insert $n$} \\
&= 9 e^{2 n \pi (a+b)} &&= 9 e^{2n\pi d}
\end{align}
\end{document}