vspace에 내가 뭘 잘못하고 있는 걸까?

vspace에 내가 뭘 잘못하고 있는 걸까?

아래 MWE(LuaLaTex)에서 왜 \vspace*{1pt}그렇게 거대한 수직 공간이 발생합니까?

\documentclass[12pt, oneside]{book}
\usepackage[showframe, paperwidth=30pc, paperheight=30pc, margin=5pc]{geometry}

\begin{document}
% \vspace*{1pt}
\begin{center}
    \Huge{Test text.}
\end{center}
\end{document}

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

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

답변1

제목 위에 정확히 한 지점의 공간을 원하는 경우 간격에 대한 더 깊은 제어가 필요합니다.

위 의 \vspace*{1pt}\begin{center}표준 공백은 center페이지 나누기 시 제거해서는 안 되는 항목이 앞에 있기 때문에 제거되지 않습니다(문서의 시작은 페이지 나누기로 계산됩니다). 따라서 총 1pt플러스를 얻습니다 \topsep.

반면에 실제로는 원하지 않고 center제목만 중앙에 배치하는 것을 원할 수도 있습니다.

\documentclass{article}
\usepackage{showframe}

\begin{document}

\vspace*{1pt}% the space you want
\vspace{-\topskip}% remove the topskip
\begingroup\centering\Huge
Test text\par
\endgroup
\addvspace{\topsep}% or what you need

Some other text follows.

\end{document}

단지 \vspace*{1pt}.

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

관련 정보