0

I would like to add a blank page after certain page in pdf Quarto. I tried using \newpage like described here with this reproducible example:

---
title: "Add blank page after certain page"
format: pdf
---

# Chapter 1

Here some random text

\newpage

\newpage

# Chapter 2

Again random rext after white page

Output:

enter image description here

As you can see in the output, there is no blank page after the first page. I also tried \pagebreak like here, but that also doesn't work. So I was wondering if anyone knows how to add a blank page between two chapters in pdf Quarto?

shafee
  • 15,566
  • 3
  • 19
  • 47
Quinten
  • 35,235
  • 5
  • 20
  • 53

3 Answers3

5

If you choose a suitable class, your "chapters" will become actual chapters and not just sections and the class will take care of inserting empty pages so your chapters will always start on odd pages:

---
title: "Add blank page after certain page"
format: 
  pdf:
    documentclass: scrbook
---

# Chapter 1

Here some random text

# Chapter 2

Again random rext after white page
2

This works for me using this accepted answer:

---
title: "Add blank page after certain page"
format:
  pdf:
    include-in-header:
      - text: |
          \newcommand*\NewPage{\newpage\null\thispagestyle{empty}\newpage}
---

# Chapter 1

Here some random text

\NewPage

# Chapter 2

Again random rext after white page
Julian
  • 6,586
  • 2
  • 9
  • 33
1

To add blank pages between chapters accounting for page numbers, we can follow this answer,

---
title: "Add blank page after certain page"
format:
  pdf:
    include-in-header:
      - text: |
          \usepackage{afterpage}
          \def\blankpage{%
          \clearpage%
          \thispagestyle{empty}%
          \addtocounter{page}{-1}%
          \null%
          \clearpage}
---

# Chapter 1

Here some random text

\blankpage

# Chapter 2

Again random rext after white page

blank pages between chapters


shafee
  • 15,566
  • 3
  • 19
  • 47