
섹션 내부에서 페이지 나누기를 방지하는 전역 명령이 있는지 알고 싶습니다. 내 모든 섹션은 충분히 짧습니다. 나는 다음과 같은 몇 가지 해결책을 읽었습니다.절대, 확실히, 페이지 나누기를 방지합니다, 하지만 자동 솔루션을 원합니다.
답변1
\filbreak
앞에 추가하세요 \section
. 다음을 사용하여 자동화할 수 있습니다 etoolbox
.
\documentclass{article}
\usepackage{etoolbox}
\preto\section{\filbreak}
\usepackage{lipsum} % just for the example
\begin{document}
\section{One}
\lipsum[1-3]
\section{Two}
\lipsum[3-4]
\section{Three}
\lipsum[4-6]
\end{document}