我有一些很长的方程式,无法使用对齐功能让它们在页面上整齐对齐。我的代码目前
\documentclass{article}
\usepackage{amsmath, amsthm, amsfonts, amssymb}
\newcommand{\fii}{\varphi}
\newcommand{\eps}{\varepsilon}
\newcommand{\intst}{\int_0^T \int}
\newcommand{\ints}{\int}
\begin{document}
\begin{align}
\begin{split}
\intst w^\eps \cdot (\fii_t - (Q \fii)_x +R^\intercal \fii ) dxdt = \intst (\ints \rho^\eps(x-y) w(t,y) dy) \cdot ( \fii_t(t,x)-(Q\fii)_x(t,x) + (R^\intercal \fii)(t,x) dxdt
\\
= \ints(\intst w(t,y) \cdot \big((\rho^\eps(x-y) \fii(t,x))_t - ( Q(t,y)\rho^\eps (x-y) \fii(t,x))_y + R^\intercal(t,y) \rho^\eps(x-y) \fii(t,x) \big) dydt ) dx \\
+ \ints(\intst w(t,y) \cdot (Q(t,y) \rho^\eps(x-y) \fii(t,x))_y-\rho^{\eps}(x-y) w(t,y)\cdot (Q(t,x) \fii(t,x))_x \\
- w(t,y)\cdot(R^\intercal (t,y) \rho^\eps (x-y) \fii(t,x)) +\rho^\eps(x-y)w(t,y)\cdot (R^\intercal (t,x) \fii(t,x)) dydt) dx \\
= \ints(\intst f(t,y) \rho^\eps(x-y) \fii(t,x) dy dt - \ints w_0(y) \rho^\eps(x-y)\fii(0,x)dy) dx \\
+ \intst (\ints \rho^\eps(x-y) Q_y(y,t) w(y,t) - (\rho^\eps)'(x-y) Q(t,y) w(t,y) - \rho^\eps(x-y)Q_x(t,x) w(t,y) \\
+\rho^\eps(x-y)(R(t,x)-R(t,y))w(t,y) dy) \cdot \fii(t,x) dxdt \\
+\intst ( \ints -\rho^\eps(x-y) w(t,y) dy) \cdot Q(t,x) \fii_x(t,x) dxdt \\
=\intst f^\eps(t,x) \cdot \fii (t,x) dx dt - \ints w_0^\eps(x) \cdot \fii(x,0) dx + \intst r^\eps(t,x)\cdot \fii(t,x) dx dt
\end{split}
\end{align}
\end{document}
我曾尝试过通过在不同位置添加对齐标签来使其在页面上更整齐地分布,但这似乎最终将整个内容移到了右边!例如,如果我写
\intst w^\eps \cdot (\fii_t - (Q \fii)_x +R^\intercal \fii ) dxdt = \intst (\ints \rho^\eps(x-y) w(t,y) dy) \cdot ( \fii_t(t,x)-(Q\fii)_x(t,x) + (R^\intercal \fii)(t,x) dxdt
\\
&=\ints(\intst w(t,y) \cdot \big((\rho^\eps(x-y) \fii(t,x))_t - ( Q(t,y)\rho^\eps (x-y) \fii(t,x))_y + R^\intercal(t,y) \rho^\eps(x-y) \fii(t,x) \big) dydt ) dx \\
+ \ints(\intst w(t,y) \cdot (Q(t,y) \rho^\eps(x-y) \fii(t,x))_y-\rho^{\eps}(x-y) w(t,y)\cdot (Q(t,x) \fii(t,x))_x \\
- w(t,y)\cdot(R^\intercal (t,y) \rho^\eps (x-y) \fii(t,x)) +\rho^\eps(x-y)w(t,y)\cdot (R^\intercal (t,x) \fii(t,x)) dydt) dx \\
&= \ints(\intst f(t,y) \rho^\eps(x-y) \fii(t,x) dy dt - \ints w_0(y) \rho^\eps(x-y)\fii(0,x)dy) dx \\
&+ \intst (\ints \rho^\eps(x-y) Q_y(y,t) w(y,t) - (\rho^\eps)'(x-y) Q(t,y) w(t,y) - \rho^\eps(x-y)Q_x(t,x) w(t,y) \\
&+\rho^\eps(x-y)(R(t,x)-R(t,y))w(t,y) dy) \cdot \fii(t,x) dxdt \\
&+\intst ( \ints -\rho^\eps(x-y) w(t,y) dy) \cdot Q(t,x) \fii_x(t,x) dxdt \\
&=\intst f^\eps(t,x) \cdot \fii (t,x) dx dt - \ints w_0^\eps(x) \cdot \fii(x,0) dx + \intst r^\eps(t,x)\cdot \fii(t,x) dx dt
然后我得到了这样的结果
有人能帮我对齐方程式或解释我做错了什么吗?非常感谢,A。
答案1
这提供了两种实现所需内容的方法。我还制作了一些适当尺寸的支架。
\documentclass{article}
\usepackage{amsmath, amsthm, amsfonts, amssymb}
\newcommand{\fii}{\varphi}
\newcommand{\eps}{\varepsilon}
\newcommand{\intst}{\int_0^T \int}
\newcommand{\ints}{\int}
\usepackage[margin=1in]{geometry}
\begin{document}
\begin{align}
\int_0^T & \int w^\eps \cdot (\fii_t - (Q \fii)_x +R^\intercal \fii ) dxdt\notag\\
& = \intst (\ints \rho^\eps(x-y) w(t,y) dy) \cdot ( \fii_t(t,x)-(Q\fii)_x(t,x) + (R^\intercal \fii)(t,x) dxdt
\notag \\
& = \ints\Biggl(\intst w(t,y) \cdot \biggl((\rho^\eps(x-y) \fii(t,x))_t - ( Q(t,y)\rho^\eps (x-y) \fii(t,x))_y + R^\intercal(t,y) \rho^\eps(x-y) \fii(t,x) \biggr) dydt \Biggr) dx \notag\\
&+ \ints(\intst w(t,y) \cdot (Q(t,y) \rho^\eps(x-y) \fii(t,x))_y-\rho^{\eps}(x-y) w(t,y)\cdot (Q(t,x) \fii(t,x))_x \notag\\
&- w(t,y)\cdot(R^\intercal (t,y) \rho^\eps (x-y) \fii(t,x)) +\rho^\eps(x-y)w(t,y)\cdot (R^\intercal (t,x) \fii(t,x)) dydt) dx \notag\\
&= \ints(\intst f(t,y) \rho^\eps(x-y) \fii(t,x) dy dt - \ints w_0(y) \rho^\eps(x-y)\fii(0,x)dy) dx \notag\\
&+ \intst (\ints \rho^\eps(x-y) Q_y(y,t) w(y,t) - (\rho^\eps)'(x-y) Q(t,y) w(t,y) - \rho^\eps(x-y)Q_x(t,x) w(t,y) \notag\\
&+\rho^\eps(x-y)(R(t,x)-R(t,y))w(t,y) dy) \cdot \fii(t,x) dxdt \notag\\
& +\intst ( \ints -\rho^\eps(x-y) w(t,y) dy) \cdot Q(t,x) \fii_x(t,x) dxdt \notag\\
&=\intst f^\eps(t,x) \cdot \fii (t,x) dx dt - \ints w_0^\eps(x) \cdot \fii(x,0) dx + \intst r^\eps(t,x)\cdot \fii(t,x) dx dt
\end{align}
\begin{multline}
\int_0^T \int w^\eps \cdot (\fii_t - (Q \fii)_x +R^\intercal \fii ) dxdt \\
= \intst (\ints \rho^\eps(x-y) w(t,y) dy) \cdot ( \fii_t(t,x)-(Q\fii)_x(t,x) + (R^\intercal \fii)(t,x) dxdt
\\
= \ints(\intst w(t,y) \cdot \big((\rho^\eps(x-y) \fii(t,x))_t - ( Q(t,y)\rho^\eps (x-y) \fii(t,x))_y + R^\intercal(t,y) \rho^\eps(x-y) \fii(t,x) \big) dydt ) dx \\
+ \ints(\intst w(t,y) \cdot (Q(t,y) \rho^\eps(x-y) \fii(t,x))_y-\rho^{\eps}(x-y) w(t,y)\cdot (Q(t,x) \fii(t,x))_x \\
- w(t,y)\cdot(R^\intercal (t,y) \rho^\eps (x-y) \fii(t,x)) +\rho^\eps(x-y)w(t,y)\cdot (R^\intercal (t,x) \fii(t,x)) dydt) dx \\
= \ints(\intst f(t,y) \rho^\eps(x-y) \fii(t,x) dy dt - \ints w_0(y) \rho^\eps(x-y)\fii(0,x)dy) dx \\
+ \intst (\ints \rho^\eps(x-y) Q_y(y,t) w(y,t) - (\rho^\eps)'(x-y) Q(t,y) w(t,y) - \rho^\eps(x-y)Q_x(t,x) w(t,y) \\
+\rho^\eps(x-y)(R(t,x)-R(t,y))w(t,y) dy) \cdot \fii(t,x) dxdt \\
+\intst ( \ints -\rho^\eps(x-y) w(t,y) dy) \cdot Q(t,x) \fii_x(t,x) dxdt \\
=\intst f^\eps(t,x) \cdot \fii (t,x) dx dt - \ints w_0^\eps(x) \cdot \fii(x,0) dx + \intst r^\eps(t,x)\cdot \fii(t,x) dx dt
\end{multline}
\end{document}
答案2
这是一个变体,基于对齐。我定义了一个\brparen
命令,它在其参数的每一侧添加一对可调整的括号,同时允许在里面换行(代码改编自文档中的示例mathtools
)。我还定义了一个\dd
用于积分微分的命令,具有正确的间距和罗马字体d
:
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{mathtools, amsthm, amsfonts, amssymb}
\newcommand{\fii}{\varphi}
\newcommand{\eps}{\varepsilon}
\newcommand{\intst}{\int_0^T\mkern-8mu \int}
\newcommand{\ints}{\int}
\newcommand\MTkillspecial[1]{% helper macro
\bgroup
\catcode`\&=9
\let\\\relax%
\scantokens{#1}%
\egroup
}
\DeclarePairedDelimiter\brparen\lparen\rparen
\reDeclarePairedDelimiterInnerWrapper\brparen{star}{
\mathopen{#1\vphantom{\MTkillspecial{#2}}\kern-\nulldelimiterspace\right.}
#2
\mathclose{\left.\kern-\nulldelimiterspace\vphantom{\MTkillspecial{#2}}#3}}
\newcommand*{\dd}{\mathop{\kern0pt\mathrm{d}}\!{}}
\begin{document}
\begin{align}
& \intst w^\eps \cdot (\fii_t - (Q \fii)_x +R^\intercal \fii ) \dd x\dd t \\
& = \intst\biggl (\ints \rho^\eps(x-y) w(t,y) \dd y\biggr) \cdot ( \fii_t(t,x)-(Q\fii)_x(t,x) + (R^\intercal \fii)(t,x) \dd x\dd t
\\
& =\!\begin{aligned}[t] \ints\brparen[\bigg]{\intst w(t,y) \cdot \brparen[\Big]{\bigl(\rho^\eps(x-y) \fii(t,x)\bigr)_t & -\bigl( Q(t,y)\rho^\eps (x-y) \fii(t,x)\bigr)_y\\ & + R^\intercal(t,y) \rho^\eps(x-y) \fii(t,x)}\dd y\dd t} \dd x \end{aligned} \\
&\phantom{=} + \begin{aligned}[t]\ints\brparen[\bigg]{ \intst & w(t,y) \cdot\bigl (Q(t,y) \rho^\eps(x-y) \fii(t,x)\bigr)_y -\rho^{\eps}(x-y) w(t,y)\cdot\bigl(Q(t,x) \fii(t,x)\bigr)_x \\
{}- {}& w(t,y)\cdot\bigl(R^\intercal (t,y) \rho^\eps (x-y) \fii(t,x)\bigr) +\rho^\eps(x-y)w(t,y)\cdot \bigl(R^\intercal (t,x) \fii(t,x)\bigr) \dd y\dd t} \mathrlap{\dd x} \end{aligned}\\
& = \ints\brparen[\bigg]{\intst f(t,y) \rho^\eps(x-y) \fii(t,x) \dd y \dd t - \ints w_0(y) \rho^\eps(x-y)\fii(0,x)\dd y} \dd x \\
& \phantom{=}+ \begin{aligned}[t]\intst\brparen[\bigg]{\ints \rho^\eps(x-y) Q_y(y,t) w(y,t) - (\rho^\eps)'(x-y) Q(t,y) w(t,y) - \rho^\eps(x-y)Q_x(t,x) w(t,y) &\\
+\rho^\eps(x-y)\bigl(R(t,x)-R(t,y)\bigr)w(t,y) \dd y} \cdot \fii(t,x) \dd x\dd t&\end{aligned} \\
& \phantom{ = }+\intst\biggl ( \ints -\rho^\eps(x-y) w(t,y) \dd y\biggr) \cdot Q(t,x) \fii_x(t,x) \dd x\dd t \\
& =\intst f^\eps(t,x) \cdot \fii (t,x) \dd x \dd t - \ints w_0^\eps(x) \cdot \fii(x,0) \dd x + \intst r^\eps(t,x)\cdot \fii(t,x) \dd x \dd t
\end{align}
\end{document}