![统一对齐内和对齐外的行距](https://linux22.com/image/350308/%E7%BB%9F%E4%B8%80%E5%AF%B9%E9%BD%90%E5%86%85%E5%92%8C%E5%AF%B9%E9%BD%90%E5%A4%96%E7%9A%84%E8%A1%8C%E8%B7%9D.png)
我有这样一个代码:
\documentclass[12pt,a4paper,openany,fleqn]{book}
\usepackage[margin=1.8cm, top=2cm]{geometry}
\usepackage{amsmath,amssymb, amsfonts}
\usepackage[no-math]{fontspec}
\parindent = 0 pt
\linespread{2.9} %set it very big to emphasize the problem
\begin{document}
$12345678910$\\
\fbox{$\begin{alignedat}[t]{2}d_{l^2}(\mathbf{x},\mathbf{z})&=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2+\cdots+(x_n-y_n)^2}\\
&=\sqrt{(x_1-y_1+y_1-z_1)^2+(x_2-y_2+y_2-z_2)^2+\cdots+(x_n-y_n+y_n-z_n)^2}
\end{alignedat}$}\\
Let $\mathbf{u}=(x_1-y_1,x_2-y_2,\cdots,x_n-y_n),~\mathbf{v}=(y_1-z_1,y_2-z_2,\cdots,y_n-z_n)$.\\
Then $\begin{alignedat}[t]{2}&=\lVert\mathbf{u}+\mathbf{v}\rVert_2\overset{\star}{\leq} \lVert\mathbf{u}\rVert_2+\lVert\mathbf{v}\rVert_2\\
&=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2+\cdots+(x_n-y_n)^2}+\sqrt{(y_1-z_1)^2+(y_2-z_2)^2+\cdots+(y_n-z_n)^2}\\
&=d_{l^2}(x,y)+d_{l^2}(y,z)
\end{alignedat}$\\
Test Words. Test Words.\\
Test Words. Test Words.\\
Test Words. Test Words.\\
\end{document}
问 1.行距alignedat
和普通文本是否完全相同?嗯,看起来是这样的,但我不太确定。
问2.可以看到,并不是每行的间距都一样。红色位置的行间距是由什么控制的?我觉得和 没什么关系fboxsep
,因为如果我去掉\fbox
,间距还是在的。我该如何改变它,让它和其他的保持一致?我该如何统一内外的行间距alignat
?