我无法格式化以下数学表达式:
\begin{align*}
A &= \left(\left(\frac{1}{2},\frac{1}{2}\right) + \sqrt{2}Rot_{-\pi/4}\left\langle 0, \frac{1}{2} \right\rangle, \sqrt{2}Rot_{\pi/4}\left\langle 0, \frac{1}{2} \right\rangle \sqrt{2}Rot_{3\pi/4}\left\langle 0, \frac{1}{2} \right\rangle\right)\\
&= \left(\left(\frac{1}{2},\frac{1}{2}\right)+ \sqrt{2}
\begin{pmatrix} \cos(\pi/4) & \sin(\pi/4) \\
-\sin(\pi/4) & \cos(\pi/4) \end{pmatrix}, \sqrt{2}
\begin{pmatrix} \cos(\pi/4) & -\sin(\pi/4) \\
\sin(\pi/4) & \cos(\pi/4) \end{pmatrix}, \sqrt{2}
\begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
\sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}
\begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
\sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}\right)\\
\end{align*}
它给出了以下结果:
我希望超出页面的部分继续在下一行并略微缩进。我尝试使用更多align
符号来实现这一点,但失败了,因为每当我换行时,我都会留下一个不匹配的\left(
。
我该如何格式化它,以便页面上运行的方程式部分继续到下一行并带有一点缩进?
谢谢大家的帮助!
答案1
改用multline*
。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline*}
\left(\left(\frac{1}{2},\frac{1}{2}\right)+ \sqrt{2}
\begin{pmatrix} \cos(\pi/4) & \sin(\pi/4) \\
-\sin(\pi/4) & \cos(\pi/4) \end{pmatrix}, \sqrt{2}
\begin{pmatrix} \cos(\pi/4) & -\sin(\pi/4) \\
\sin(\pi/4) & \cos(\pi/4) \end{pmatrix},\right.\\
\left. \qquad \sqrt{2} %% remove \qquad if you want
\begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
\sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}
\begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
\sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}\right)\\
\end{multline*}
\end{document}
对于更新的查询和需求,使用mathtools
(而不是amsmath
)和它multlined
环境。
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align*}
A &= \left(\left(\frac{1}{2},\frac{1}{2}\right) + \sqrt{2}Rot_{-\pi/4}\left\langle 0, \frac{1}{2} \right\rangle, \sqrt{2}Rot_{\pi/4}\left\langle 0, \frac{1}{2} \right\rangle \sqrt{2}Rot_{3\pi/4}\left\langle 0, \frac{1}{2} \right\rangle\right)\\
&=\!\!
\begin{multlined}[t]
\left(\left(\frac{1}{2},\frac{1}{2}\right)+ \sqrt{2}
\begin{pmatrix} \cos(\pi/4) & \sin(\pi/4) \\
-\sin(\pi/4) & \cos(\pi/4) \end{pmatrix}, \sqrt{2}
\begin{pmatrix} \cos(\pi/4) & -\sin(\pi/4) \\
\sin(\pi/4) & \cos(\pi/4) \end{pmatrix},\right.\\[\jot]
\left. \qquad \sqrt{2} %% remove \qquad if you want
\begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
\sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}
\begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
\sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}\right)\\
\end{multlined}
\end{align*}
\end{document}