3

In the MWE below (LuaLaTex), why \vspace*{1pt} causes such a huge vertical space?

\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}

enter image description here

enter image description here

blackened
  • 4,181

1 Answers1

3

If you want exactly one point of space above the title, then you need some deeper control on spacing.

With \vspace*{1pt}\begin{center} the standard space above center is not removed because it's preceded by something that must not be removed at a page break (the start of a document counts as a page break). Thus you get the total of 1pt plus the \topsep.

On the other hand, you probably don't actually want center, but only centering the title.

\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}

Note that you need something more than just \vspace*{1pt}.

enter image description here

egreg
  • 1,121,712