I want to add an exact amount of space between type area and a section:
\documentclass{scrbook}
\KOMAoptions{fontsize=10pt, paper=14cm:21cm, DIV=calc, pagesize=auto, BCOR=5mm, twoside=true, titlepage=true}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
% shows frames of type area (good for debugging)
\usepackage{showframe}
\begin{document}
%\vspace*{-\topskip} % removes \topskip space
\vspace*{0em} % space amout is 0em for testing purpose; remove or comment to get absolutely no space
\section{Test}
\end{document}
I think the command \vspace*{0em} expands the section’s glue, right? If I remove \vspace*{0em} the section is on the top of the type area. Somehow \vspace*{0em} should do the same thing. The background is that I want to add an exact space between type area and section, but it’s always to much space. Any idea to fix this?
\vspace*necessarily inserts space (regardless of where it's issued) while\vspaceis a little less invasive (see Adding vertical space at the start of a page). Once you insert\vspace*{0em}, you already have "something" at the top of the page, followed by the regular\sectiontop skip... – Werner Jul 13 '12 at 22:46\vspace*{0em}by\hbox{}(an empty box) you can see the same effect. This happens because\sectioninserts a vertical space at its top (which is discarded by tex if it is the first vertical material in a page, which is not the case after inserting\hboxor\vspace*). So the question should be "How can I remove the vertical space that the next command will insert?". I don't know the answer for this one. – JLDiaz Jul 13 '12 at 22:52\vspace*{0em}with\null. Seems to have something to do with the definition of\section:\newcommand{\subsection}{\@startsection{subsection}{1}{\z@}{-0.2ex}{2.3ex \@plus.2ex} .... Like you wrote: How to force LaTeX not to add extra space as there is no object before\section? – Ronny Jul 14 '12 at 00:10\sectionif you insert one with\nullor\vspace*. This might be an argument from a technical POV, but you won't be able to change anything about that. – Stephan Lehmke Jul 14 '12 at 06:48