我想在两个对齐块之间对齐两个对齐字符,这样我可以在一个派生的中间有一些文本,其中方程式保持水平对齐。例如,以下使用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*}
理想情况下,我希望第二个块中等式的左边与第一个块中的第二个等式的左边对齐。我可以通过不在中间的文本来做一个解决方法,但是,我想要这个功能。
修改
我希望之间有大量的文字。说三到四行排成正常段落。在对齐块中添加文本是我很难提及的解决方法。
答案 0 :(得分:6)
使用\noalign
:
\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]\\
\noalign{\noindent some text in the middle.}
& \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*}
答案 1 :(得分:5)
有一个非常方便的命令:
\begin{align*}
\int_0^1 x^2 &= \frac{1}{3} \\
\intertext{I am the intertext. I am typesetted as normal text but dude,
the tabbing/alignment is carried over to the next slide.
Check it out!}
\int_0^1 x^3 &= \frac{1}{4}
\end{align*}
据我记得,它在ams用户指南中有所描述。但是,我最近才发现它。
答案 2 :(得分:2)
尝试以下方法:
\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]\\
& \mbox{some text in the middle} \\
& \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*}
如果您有大量文字,可能需要使用\phantom
:
\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, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text,
\begin{align*}
\phantom{\frac{\delta \phi}{\delta x_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*}
如果您不想使用\phantom
,我能提出的唯一解决方案如下:
\usepackage{multirow}
....
\begin{document}
\[ \begin{array}{rl}
\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]\\[5mm]
\multicolumn{2}{l}{\parbox{\linewidth}{Some text in the middle, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text, more text}}\\[1cm]
& \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{array} \]
\end{document}
我认为没有一种直接的方式将一个表/ eqnarray / align的一列的宽度“连接”到另一个表。
答案 3 :(得分:1)
如果您没有太多文本,可以使用数学环境中的\text
命令在单个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]\\
\text{some text in the middle.}\\
& \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*}