如何在导言区设置`\abovedisplayskip`?

2019-10-15 21:03发布

想实现`\setlength{\abovedisplayskip}{0pt}`,在导言区写是不生效的,只有在正文区写`\setlength{\abovedisplayskip}{0pt}`才有用,那么...

想实现`\setlength{\abovedisplayskip}{0pt}`,在导言区写是不生效的,只有在正文区写`\setlength{\abovedisplayskip}{0pt}`才有用,那么如何才能在导言区设置`\abovedisplayskip`? 尝试了用`etoolbox`宏包,没有效果 ```tex \documentclass{ctexart} \usepackage{amsmath} \usepackage{etoolbox} \AtBeginEnvironment{document}{ \setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt} \setlength{\belowdisplayshortskip}{0pt} \setlength{\belowdisplayskip}{0pt} } \usepackage{zhlipsum} \begin{document} \zhlipsum*[1] \[ \int_{0}^{+\infty} 1/x^{2} \, dx \] \zhlipsum*[2] \end{document} ```
2条回答
registor
2019-10-15 22:21
这些长度与字体大小有关,不宜在导言区设置,非要设置的话,可以参考下面两个帖子。 [https://tex.stackexchange.com/questions/69662/how-to-globally-change-the-spacing-around-equations](https://tex.stackexchange.com/questions/69662/how-to-globally-change-the-spacing-around-equations) 或 [https://latex.org/forum/viewtopic.php?t=3837](https://latex.org/forum/viewtopic.php?t=3837)

一周热门 更多>