1

In the following MWE, I have a 2-column document (created with paracol) where I tried to add both:

  • a vertical whitespace between the top margin and the "Header", which worked by using \vspace*{0.5cm}, and
  • a vertical whitespace between the "Header" and the "Sub-Header", still using \vspace*{0.5cm}. However, that command did not work, and no whitespace was created between the "Header" and the "Sub-Header".

How to add a whitespace between the "Header" and the "Sub-Header" in my MWE?

\documentclass[12pt,english]{article}
\usepackage{paracol}
\usepackage{lipsum}
\usepackage{babel}
\usepackage{microtype}
\setlength\parindent{0pt}

\begin{document}

\begin{paracol}{2} \lipsum[1] \switchcolumn \vspace{0.5cm} {\LARGE Header} \newline \vspace{0.5cm} {\Large Sub-Header} \newline \lipsum[1] \end{paracol}

\end{document}

enter image description here

Ommo
  • 835
  • Short answer: \newline doesn't put TeX in the mode needed for \vspace to work. You need \par. (See the answer to the question referenced in the previous comment.) – barbara beeton Mar 29 '24 at 16:36

1 Answers1

2

You should finish the paragraph before switching back to a different font size. Otherwise the line spacing in your header will be wrong.

As a side effect, you'll also be able to add vertical space:

\documentclass[12pt,english]{article}
\usepackage{paracol}
\usepackage{lipsum}
\usepackage{babel}
\usepackage{microtype}
\setlength\parindent{0pt}

\begin{document}

\begin{paracol}{2} \lipsum[1] \switchcolumn \vspace{0.5cm} {\LARGE Header\par} \vspace{0.5cm} {\Large Sub-Header\par} \lipsum[1] \end{paracol}

\end{document}

enter image description here