표시된 수학 뒤, \item 앞의 간격

표시된 수학 뒤, \item 앞의 간격

이 질문은 표시된 수학 이후의 간격과 그것이 enumerate환경 내부의 간격과 어떻게 상호 작용하는지에 관한 것입니다. 구체적으로 MWE는 다음과 같습니다.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
First line. Blah blah blah blah blah blah blah blah.
\[a+b=c\] % The spacing above and below is the same
Second line. Blah blah blah blah blah blah blah blah.
\begin{enumerate}
\item First line. Blah blah blah blah blah blah blah.
\[a+b=c.\] % The spacing below is bigger than the spacing above
\item Second item. Blah blah blah blah blah blah blah.
\item Third item. Blah blah blah blah blah blah blah.
\end{enumerate}
\end{document}

기본 수준에서 이 MWE에서는 표시된 수학 전후의 수직 간격이 두 경우 모두 동일하기를 원합니다.

보다 일반적으로 (그리고 기술적으로) 나는 \itemsep(또는 추가 공간을 추가하는 모든 것이) 마치 유형 공간 \belowdisplayskip인 것처럼 상호 작용하기를 원 \addvspace하므로 둘 중 최대값이 사용됩니다. 누구든지 이 작업을 수행하는 방법을 제안할 수 있습니까?

메모:위에 포함시켰지만 amsmath이 문제는 로드되지 않은 상태에서도 발생합니다 amsmath. 이것이 필요한 곳에서는 실제로 패키지 작업에도 필요 enumitem하지만 이것이 어떤 솔루션에도 방해가 될 것이라고 생각하지 않습니다.

답변1

목록이 구현되는 방식에 따라 예상되는 방식입니다. Any는 \item단락을 시작하고 TeX는 ; 외에 (클래스에 의해 설정되는) \parskip값과 동일하게 설정된 목록인 글루를 삽입합니다 . 이 경우에는 통과하지 못하지만 통과합니다.\parsep\itemsep\itemsep\parskip

예(더 쉬운 비교를 위한 두 개의 열 형식)

\documentclass[twocolumn]{article}
\usepackage{amsmath}
\begin{document}
First line. Blah blah blah blah blah blah blah blah.
\[a+b=c\] % The spacing above and below is the same
Second line. Blah blah blah blah blah blah blah blah.
\newpage
\begin{enumerate}
\item First line. Blah blah blah blah blah blah blah.
\[a+b=c.\] % The spacing below is bigger than the spacing above
\item Second item. Blah blah blah blah blah blah blah.
\item Third item. Blah blah blah blah blah blah blah.
\end{enumerate}

\end{document}

여기에 이미지 설명을 입력하세요

결정된:

\documentclass[twocolumn]{article}
\usepackage{amsmath}
\begin{document}
First line. Blah blah blah blah blah blah blah blah.
\[a+b=c\] % The spacing above and below is the same
Second line. Blah blah blah blah blah blah blah blah.
\newpage
\begin{enumerate}
\item First line. Blah blah blah blah blah blah blah.
\[a+b=c.\vspace{-\parskip}\] % The spacing below is equal to the spacing above
\item Second item. Blah blah blah blah blah blah blah.
\item Third item. Blah blah blah blah blah blah blah.
\end{enumerate}

\end{document}

여기에 이미지 설명을 입력하세요

패키지 를 로드하는 것이 합리적일 수 있습니다 enumitem.

\documentclass[twocolumn]{article}
\usepackage{amsmath,enumitem}
\begin{document}
First line. Blah blah blah blah blah blah blah blah.
\[a+b=c\] % The spacing above and below is the same
Second line. Blah blah blah blah blah blah blah blah.
\newpage
\begin{enumerate}[itemsep=\glueexpr\itemsep+\parsep\relax,parsep=0pt]
\item First line. Blah blah blah blah blah blah blah.
\[a+b=c.\] % The spacing below is equal to the spacing above
\item Second item. Blah blah blah blah blah blah blah.
\item Third item. Blah blah blah blah blah blah blah.
\end{enumerate}

\end{document}

그러나 이것은 물론 단일 항목 내의 단락에 영향을 미칩니다.

관련 정보