模仿 `\shortintertext` 的间距

模仿 `\shortintertext` 的间距

我正在尝试创建两个 -align*环境,并在它们之间添加一些文本。由于文本很短,我通常会使用\shortintertext。但我不想让这两个环境共享制表位——因此,我有两个不同的环境。但现在,短行周围的间距太大了;我该如何纠正这个问题?

\documentclass{scrartcl}
\usepackage{mathtools}
\begin{document}
\hrulefill
\begin{align}
    e &= q\\
    e &= q
\end{align}
\vskip-\belowdisplayskip
\vskip3pt
\hrulefill
\vskip3pt
\vskip-\abovedisplayskip
\begin{align}
    e &= q\\
        e &= q
\end{align}
\hrulefill
\begin{align}
    e &= q\\
    e &= q\\
    \shortintertext{\hrulefill}
    e &= q\\
    e &= q
\end{align}
\hrulefill
\end{document}

在此处输入图片描述

答案1

align在里面使用gather

\documentclass{scrartcl}
\usepackage{mathtools}
\begin{document}
\noindent\hrulefill
\begin{gather}
\begin{align}
    e &= qqqqqqq\\
    e &= qqqq
\end{align}
\shortintertext{something that occupies some space without any
real meaning, I like self-reference}
\begin{align}
    e &= qqqqqqqqqqqqqqqq\\
    e &= qqqq
\end{align}
\shortintertext{something that occupies some space without any
real meaning, I like self-reference}
\begin{align}
    e &= qqqqqqqqq\\
    e &= q\\
\shortintertext{something that occupies some space without any
real meaning, I like self-reference}
    e &= qqqqq\\
    e &= q
\end{align}
\end{gather}
\hrulefill
\end{document}

在此处输入图片描述

相关内容