3

I was doing some homework in LaTeX, and I wanted to put some blank space below a subparagraph heading so that I could draw a diagram in after printing it out. For the subparagraphs where I had content before the spacing, using \vspace worked fine to insert blank space. However, when I tried putting a \vspace directly after a \subparagraph, like

\subparagraph{some homework section}
\vspace{2in}

the vertical space rendered above the subparagraph heading rather than below it. I temporarily fixed it by adding a \quad before the \vspace, but that feels hacky and I would rather know the reason it's exhibiting this behavior. This occurred with both \vspace and \vspace*

1
  • @GonzaloMedina How do I do that? Edit: Oh. Sep 13 '13 at 0:48
4

When you use \vspace in vertical mode, \vspace simply executes a \vskip (in vertical mode) and this produces the undesired effect; just make sure to leave vertical mode using, for example, \mbox{} or \leavevmode directly (your \quad also causes to leave vertical mode):

\documentclass{article}

\begin{document}

a
\subparagraph{some homework section}
\leavevmode\vspace{2in}

b

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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