From f11aedb1321a90d07203356294e1f1c79f2da262 Mon Sep 17 00:00:00 2001 From: Qurcaivel Date: Mon, 30 Sep 2024 00:35:58 +0300 Subject: [PATCH] fix: math environment indents --- preamble.tex | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/preamble.tex b/preamble.tex index 3c0bc1b..4469639 100644 --- a/preamble.tex +++ b/preamble.tex @@ -953,7 +953,12 @@ \newlength{\eqindent} \setlength{\eqindent}{1.4em} % Recommended: baselineskip, 1.3em, 1.4em, 1.5em -\AtBeginEnvironment{equation}{\setlength\abovedisplayskip{\eqindent - \baselineskip}} -\AtBeginEnvironment{equation}{\setlength\belowdisplayskip{\eqindent}} -\AtBeginEnvironment{equation}{\setlength\abovedisplayshortskip{\eqindent - \baselineskip}} -\AtBeginEnvironment{equation}{\setlength\belowdisplayshortskip{\eqindent}} \ No newline at end of file +\usepackage{pgffor} + +% Note: if necessary, supplement the list with the necessary math environment +\foreach \env in {equation, equation*, align, align*}{ + \AtBeginEnvironment{\env}{\setlength\abovedisplayskip{\eqindent - \baselineskip}} + \AtBeginEnvironment{\env}{\setlength\belowdisplayskip{\eqindent}} + \AtBeginEnvironment{\env}{\setlength\abovedisplayshortskip{\eqindent - \baselineskip}} + \AtBeginEnvironment{\env}{\setlength\belowdisplayshortskip{\eqindent}} +}