TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to add an exact amount of space between type area and a section:


\KOMAoptions{fontsize=10pt, paper=14cm:21cm, DIV=calc, pagesize=auto, BCOR=5mm,     twoside=true, titlepage=true}


% shows frames of type area (good for debugging)


%\vspace*{-\topskip}  % removes \topskip space
\vspace*{0em}  % space amout is 0em for testing purpose; remove or comment to get absolutely no space


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?

share|improve this question
Inserting \vspace* necessarily inserts space (regardless of where it's issued) while \vspace is 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 \section top skip... – Werner Jul 13 '12 at 22:46
If you replace your \vspace*{0em} by \hbox{} (an empty box) you can see the same effect. This happens because \section inserts 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 \hbox or \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
@Werner I know that already, but how does this help? – Ronny Jul 14 '12 at 0:03
@JLDiaz Yes, noticed this by replacing \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 0:10
Please accept that there is an object before \section if you insert one with \null or \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 6:48
up vote 1 down vote accepted

My own not perfectly working solution is:


\KOMAoptions{fontsize=10pt, paper=14cm:21cm, DIV=calc, pagesize=auto, BCOR=5mm, twoside=true, titlepage=true}

% shows frames of type area (good for debugging)

% change definition of \section; remove space before
  {2.3ex \@plus.2ex}%
  {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
    \setlength{\parfillskip}{\z@ plus 1fil}\fi





The code redefines the \section command in the way that the space before is set to -0.01ex (must be a negative number to avoid paragraph indention). There is only a little bit space left. Remove or comment out \vspace*{-\topskip} to see test this.

share|improve this answer
Does any one know where the little extra space comes from? – Ronny Jul 14 '12 at 11:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.