更新

更新

below-intertext-sep包中的代码mathtools无法正常工作。
我使用这个例子:

\documentclass[12pt]{report}
\usepackage{mathtools}
\begin{document}
\mathtoolsset{%
below-shortintertext-sep = 28pt,above-shortintertext-sep =1pt,
below-intertext-sep = 2pt,
above-intertext-sep =18pt
}
\begin{align*}
a &< b+c \\
\shortintertext{text text text text text text text text text text text text }
b &< a+c 
\end{align*}
\begin{align*}
a &< b+c \\
\intertext{text text text text text text text text text text text text }
b &< a+c 
\end{align*}
\end{document}

谢谢你的负责任。
在此处输入图片描述

答案1

更新

使用mathtools2018-01-08 发布的版本 v1.21,以下文档的打印内容与下面的示例完全相同,表明该错误已被修复。

\documentclass[12pt]{report}
\usepackage{mathtools}

\mathtoolsset{%
  below-shortintertext-sep = 28pt,
  above-shortintertext-sep =  1pt,
  below-intertext-sep = 50pt,
  above-intertext-sep =  0pt,
}

\begin{document}

Some text to separate alignments from each other and to see them
in context. Let's make it long enough to split across two lines.
\begin{align*}
a &< b+c \\
\shortintertext{text text text text text text text text text text text text }
b &< a+c 
\end{align*}
Some text to separate alignments from each other and to see them
in context. Let's make it long enough to split across two lines.
\begin{align*}
a &< b+c \\
\intertext{text text text text text text text text text text text text }
b &< a+c 
\end{align*}
Some text to separate alignments from each other and to see them
in context. Let's make it long enough to split across two lines.
\end{document}

原始答案(修复错误之前)

这是 中的一个错误mathtools.sty; 的定义\intertext是间接的(因此\intertext只能在某些地方使用)并且\l_MT_above_intertext_sep在末尾使用了 ,而它应该是\l_MT_below_intertext_sep

\def\MT_intertext: {%
  \def\intertext##1{%
    \ifvmode\else\\\@empty\fi
    \noalign{%
      \penalty\postdisplaypenalty\vskip\belowdisplayskip
      \vskip-\lineskiplimit      % CCS
      \vskip\normallineskiplimit % CCS
      \vskip\l_MT_above_intertext_sep
       \vbox{\normalbaselines
         \ifdim
           \ifdim\@totalleftmargin=\z@
             \linewidth
           \else
             -\maxdimen
           \fi
         =\columnwidth
        \else \parshape\@ne \@totalleftmargin \linewidth
        \fi
        \noindent\ignorespaces##1\par}%
      \penalty\predisplaypenalty\vskip\abovedisplayskip%
      \vskip-\lineskiplimit      % CCS
      \vskip\normallineskiplimit % CCS
      \vskip\l_MT_above_intertext_sep
   }%
 }%
 \MH_let:NwN \shortintertext \shortintertext@
}

还有一个问题:你必须声明original-intertext=false。这是一组补丁和输出。

\documentclass[12pt]{report}
\usepackage{mathtools}
\usepackage{xpatch}

\MHInternalSyntaxOn
\xpatchcmd{\MT_intertext:}
 {\l_MT_above_intertext_sep}
 {\nonexistentmacro}
 {}{}
\xpatchcmd{\MT_intertext:}
 {\l_MT_above_intertext_sep}
 {\l_MT_below_intertext_sep}
 {}{}
\xpatchcmd{\MT_intertext:}
 {\nonexistentmacro}
 {\l_MT_above_intertext_sep}
 {}{}
\MHInternalSyntaxOff

\mathtoolsset{%
  original-intertext=false,
  below-shortintertext-sep = 28pt,
  above-shortintertext-sep =  1pt,
  below-intertext-sep = 50pt,
  above-intertext-sep =  0pt,
}

\begin{document}

Some text to separate alignments from each other and to see them
in context. Let's make it long enough to split across two lines.
\begin{align*}
a &< b+c \\
\shortintertext{text text text text text text text text text text text text }
b &< a+c 
\end{align*}
Some text to separate alignments from each other and to see them
in context. Let's make it long enough to split across two lines.
\begin{align*}
a &< b+c \\
\intertext{text text text text text text text text text text text text }
b &< a+c 
\end{align*}
Some text to separate alignments from each other and to see them
in context. Let's make it long enough to split across two lines.
\end{document}

在此处输入图片描述

相关内容