1

I would like to render to a paged html document. I see instructions here for placing {{< pagebreak >}} between chunks to produce this, but I don't see the intended result in the rendered document. What did I do wrong?

Here is the code and I placed a screenshot of the document below. Thank you!

https://quarto.org/docs/authoring/markdown-basics.html

---
title: "Untitled"
format: 
  html:
    page-layout: article
editor: source
---

```{r}
1+1
```

{{< pagebreak >}}

```{r}
2+2
```

{{< pagebreak >}}

```{r}
3+3
```

rendered document

1 Answer 1

3

You cannot see it right away in the preview. You have to press Ctrl+P (on Windows) or add a button inside your html file,e.g.

<button onclick="window.print(); return false;" /> Print </button>

to see that it works as expected.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! I see what you mean about the print. Is there any way to separate the pages in the browser view, kind of like a revealjs presentation where the slides appear in the browser as separate pages?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.