LaTex,在对齐块之间对齐对齐字符
我想在两个对齐块之间对齐两个对齐字符,以便我可以在推导中间有一些文本,并用方程保持水平对齐。例如,以下使用对齐的乳胶摘录
\begin{align*}
\frac{\delta \phi}{\delta x_1} = {} &\frac{9}{8}\frac{\delta_1\phi}{\delta_1x_1}-\frac{1}{8}\frac{\delta_3\phi}{\delta_3x_1} \\
& \frac{9}{8}\frac{1}{h_1}\left[\phi(x_1+h_1/2)-\phi(x_i-h_1/2)\right]-\frac{1}{8}\frac{1}{3h_1}\left[\phi(x_i+3h_1/2)-\phi(x_1-3h_1/2)\right]
\end{align*}
some text in the middle
\begin{align*}
& \frac{9}{8}\frac{1}{h_1}\left[\phi(x_1+h_1/2)-\phi(x_i-h_1/2)\right]-\frac{1}{8}\frac{1}{3h_1}\left[\phi(x_i+3h_1/2)-\phi(x_1-3h_1/2)\right]
\end{align*}
理想情况下,我希望第二个块中的方程的左侧与第一个块中的第二个方程的左侧对齐。我可以通过不在中间添加文本来解决此问题,但是,我想要此功能。
编辑
我想在两者之间有大量的文字。说出与普通段落一样排列的三到四行。在对齐块中添加文本是我没有提到的解决方法。
I would like to align two alignment characters between two align blocks so that I can have some text in the middle of a derivation with equations maintaining the horizontal alignment. For example the following excerpt of latex using align
\begin{align*}
\frac{\delta \phi}{\delta x_1} = {} &\frac{9}{8}\frac{\delta_1\phi}{\delta_1x_1}-\frac{1}{8}\frac{\delta_3\phi}{\delta_3x_1} \\
& \frac{9}{8}\frac{1}{h_1}\left[\phi(x_1+h_1/2)-\phi(x_i-h_1/2)\right]-\frac{1}{8}\frac{1}{3h_1}\left[\phi(x_i+3h_1/2)-\phi(x_1-3h_1/2)\right]
\end{align*}
some text in the middle
\begin{align*}
& \frac{9}{8}\frac{1}{h_1}\left[\phi(x_1+h_1/2)-\phi(x_i-h_1/2)\right]-\frac{1}{8}\frac{1}{3h_1}\left[\phi(x_i+3h_1/2)-\phi(x_1-3h_1/2)\right]
\end{align*}
Ideally I would like the left of the equation in the second block to line up with that of the second equation in the first block. I could do a workaround by not having text in the middle, however, I would like this functionality.
EDIT
I would like to have a good amount of text between. Say three to four lines that line up as normal paragraphs. Adding text in the alignment block is the workaround I poorly alluded to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
有一个非常方便的命令:
据我所知,ams 用户指南中对此进行了描述。但我也是最近才发现的。
There is a very convenient command:
It's described in the ams userguide as far as I remember. But then, I also only discovered it very recently.
使用
\noalign
:Use
\noalign
:尝试以下操作:
如果您有很多文本,您可能想要使用
\phantom
:如果您不想使用
\phantom
,这是我能想到的唯一解决方案如下:我认为没有一种直接的方法可以“链接”一个表/eqnarray/与另一个表的一列的宽度。
Try the following:
If you have lots of text, you probably want to use
\phantom
:If you don't want to use
\phantom
, the only solution I can come up with is the following:I don't think there is a straight forward way of "linking up" the width of one column of one table / eqnarray / align with another.
如果不需要太多文本,可以使用数学环境中的
\text
命令在单个align*
环境中显示文本。If you don't have to much text, you can use the
\text
command from the math environment to display your text inside a singlealign*
environment.