![方程线之间的距离](https://linux22.com/image/452554/%E6%96%B9%E7%A8%8B%E7%BA%BF%E4%B9%8B%E9%97%B4%E7%9A%84%E8%B7%9D%E7%A6%BB.png)
\documentclass{article}
%%\usepackage[utf8]{inputenc} % that's the default nowadays
\usepackage{mathtools}
\usepackage{dsfont}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\label{eq6.1}
\norm{\lambda_{r,\theta}(z)}_{d+1}^{d+1}:=\sum \limits_{\theta,z}\lambda_{r,\theta}^{d+1}(z)=
\end{align*}
\begin{align*}
&=\sum \limits_{\theta,z}|\{(u_1,\dots,u_{d+1},v_1,\dots,v_{d+1})\in \mathcal{E}^{2d+2}: u_1-\sqrt{r}\theta v_1=\dots=u_{d+1}-\sqrt{r}\theta v_{d+1}=z\}|=\\
&=\sum \limits_{\theta}|\{(u_1,\dots,u_{d+1},v_1,\dots,v_{d+1})\in \mathcal{E}^{2d+2}: u_i-u_j=\sqrt{r}\theta(v_i-v_j),\ 1\leq i<j\leq d+1\}|.
\end{align*}
\end{document}
此代码代表以下公式
我想知道如何使第一行和第二行之间的距离更小?
答案1
我建议您 (a) 使用单个align*
环境而不是两个连续的align*
环境,以及 (b) 使用\MoveEqLeft
宏(由包提供mathtools
)将第一行“推”到最左边,并让以下行相对于第一行缩进。
\documentclass{article}
\usepackage{mathtools} % for \DeclarePairedDelimiter and \MoveEqLeft macros
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
%%\usepackage{dsfont} % \mathds not used in this test document
%%\usepackage{amsmath} % amsmath is loaded automatically by mathtools
\begin{document}
\begin{align*}
%\label{eq6.1} %% '\label' is not useful in unnumbered equations
\MoveEqLeft[1]{
\norm[\big]{\lambda_{r,\theta}(z)}_{d+1}^{d+1}
\coloneqq\sum_{\theta,z}\lambda_{r,\theta}^{d+1}(z)} \\
&=\sum_{\theta,z}
\abs[\big]{ \bigl\{
(u_1,\dots,u_{d+1},v_1,\dots,v_{d+1}) \in \mathcal{E}^{2d+2}:
u_1-\sqrt{r}\theta v_1 = \dots = u_{d+1}-\sqrt{r}\theta v_{d+1} = z
\bigr\} }\\
&=\sum_{\theta}
\abs[\big]{ \bigl\{
(u_1,\dots,u_{d+1},v_1,\dots,v_{d+1}) \in \mathcal{E}^{2d+2}:
u_i-u_j=\sqrt{r}\theta(v_i-v_j),\
1\leq i<j\leq d+1
\bigr\} }\,.
\end{align*}
\end{document}
附录为了解决 OP 的后续查询:为了使第一行居中,同时将接下来的两行对齐在其=
符号上,我建议您在环境中嵌入一个align*
环境gather*
:
\begin{gather*}
\norm[\big]{\lambda_{r,\theta}(z)}_{d+1}^{d+1}
\coloneqq\sum_{\theta,z}\lambda_{r,\theta}^{d+1}(z) \\
\begin{align*}
&=\sum_{\theta,z}
\abs[\big]{ \bigl\{
(u_1,\dots,u_{d+1},v_1,\dots,v_{d+1}) \in \mathcal{E}^{2d+2}:
u_1-\sqrt{r}\theta v_1 = \dots = u_{d+1}-\sqrt{r}\theta v_{d+1} = z
\bigr\} }\\
&=\sum_{\theta}
\abs[\big]{ \bigl\{
(u_1,\dots,u_{d+1},v_1,\dots,v_{d+1}) \in \mathcal{E}^{2d+2}:
u_i-u_j=\sqrt{r}\theta(v_i-v_j),\
1\leq i<j\leq d+1
\bigr\} }\,.
\end{align*}
\end{gather*}
第二附录,以解决 OP 关于对所讨论的三个方程进行编号的后续问题。要对所有三个方程进行编号,只需删除初始附录中显示的带有gather*
和环境的和环境。如果您只想对所讨论的三个方程中的部分方程进行编号,请根据需要添加(或)指令。例如,要使所有三个方程看起来都共享一个共同的单个方程编号,请向第一个和第三个方程添加指令。align*
gather
align
\notag
\nonumber
\notag
\documentclass{article}
\usepackage[letterpaper,margin=1in]{geometry} % set page parameters as needed
\usepackage{mathtools} % for \DeclarePairedDelimiter macro
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\begin{document}
\begin{gather}
\norm[\big]{\lambda_{r,\theta}(z)}_{d+1}^{d+1}
\coloneqq\sum_{\theta,z}\lambda_{r,\theta}^{d+1}(z) \\
\begin{align}
&=\sum_{\theta,z}
\abs[\big]{ \bigl\{
(u_1,\dots,u_{d+1},v_1,\dots,v_{d+1}) \in \mathcal{E}^{2d+2}:
u_1-\sqrt{r}\theta v_1 = \dots = u_{d+1}-\sqrt{r}\theta v_{d+1} = z
\bigr\} } \\
&=\sum_{\theta}
\abs[\big]{ \bigl\{
(u_1,\dots,u_{d+1},v_1,\dots,v_{d+1}) \in \mathcal{E}^{2d+2}:
u_i-u_j=\sqrt{r}\theta(v_i-v_j),\
1\leq i<j\leq d+1
\bigr\} } \,.
\end{align}
\end{gather}
\end{document}