我们可以定义一个新环境来控制公式上下空白。 演示代码如下: 演示效果图:\documentclass{article}
\usepackage{amsmath}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%
%%%自定义一个新环境来控制公式上下空白
\newenvironment{shrinkeq}[1]
{ \bgroup
\addtolength\abovedisplayshortskip{#1}
\addtolength\abovedisplayskip{#1}
\addtolength\belowdisplayshortskip{#1}
\addtolength\belowdisplayskip{#1}}
{\egroup\ignorespacesafterend}
%%%%%%%%%%%%%%%%%%%%%%%
Text before text before text before\dots
\[ \int_{a_1}^{b_1}f(x)dx+\int_{a_2}^{b_2}g(x)dx+\int_{a_3}^{b_3}h(x)dx=0 \]
Text after text after text after\dots
\bigskip
Text before text before text before\dots
\begin{shrinkeq}{-2ex}
\[ \int_{a_1}^{b_1}f(x)dx+\int_{a_2}^{b_2}g(x)dx+\int_{a_3}^{b_3}h(x)dx=0 \]
\end{shrinkeq}
Text after text after text after\dots
\end{document}
发表评论 取消回复