다음 사이의 수직 공간을 어떻게 정의할 수 있는지 알고 싶습니다.
- 이전 섹션과 새 섹션 제목
- 새 섹션 제목과 다음 텍스트.
이제 두 공간이 동일하게 측정되는 것처럼 보입니다.
답변1
솔루션은 문서 클래스에 따라 다릅니다. 일반적으로 LaTeX 커널에 정의 \section
되어 있습니다 . \@startsection
클래스 는 다음과 같은 방법을 article
정의합니다 .\section
\newcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}}
source2e
\@startsection
섹션 제목 앞과 뒤 의 공백을 제어하는 4번째 및 5번째 인수에 대한 옵션을 문서화합니다 .
\@startsection{⟨name⟩}{⟨level⟩}{⟨indent⟩}{⟨beforeskip⟩}{⟨afterskip⟩}{⟨style⟩}*[⟨altheading⟩]{⟨heading⟩}
건너뛰기 전에:절대값 = 제목 위로 이동하려면 건너뜁니다. 음수인 경우 제목 다음 텍스트의 단락 들여쓰기가 억제됩니다.
애프터스킵:긍정적인 경우 제목 아래로 건너뛰고, 그렇지 않은 경우 건너뛰어 진입 제목 오른쪽으로 이동합니다.
\section
이중 공백으로 재정의하는 예 :
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\section{Section A}
\lipsum[2]
\section{Section B}
\lipsum[2]
\makeatletter
\renewcommand*{\section}{%
\@startsection {section}{1}{\z@}%
{-7ex \@plus -3ex \@minus -.4ex}%
{4.6ex \@plus.4ex}%
{\normalfont\Large\bfseries}%
}
\makeatother
\section{New Section C}
\lipsum[2]
\section{New Section D}
\lipsum[2]
\end{document}