Add vertical space in html and latex output? Use newlines?

I try to get vertical whitespace in .html and .pdf output.

<br>\newline
<br>\linebreak

This should be easy but it's hard

What you want is a Hard Line Break.

With Pandoc Markdown, you can do that using \ followed by a newline. See https://pandoc.org/MANUAL.html#extension-escaped_line_breaks

In RStudio 1.4, there is a new visual editor that makes it easier to write Markdown content. See https://rstudio.github.io/visual-markdown-editing/#/content?id=hard-line-breaks

This is an example:

---
title: test
output: 
  pdf_document: default
  html_document: default
---

Some text\
\
\
\
\
\
\
\
\
Some other text below with spaces in between.

Thank you very much for your fast and helpful reply

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.