Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering quarto presentation to pdf from html leaves (mostly) blank page when notes exist #61

Open
tonyelhabr opened this issue Jul 18, 2022 · 4 comments

Comments

@tonyelhabr
Copy link

Hi,

I think this may be completely intentional, but I noticed that when there is a speaker note on a slide, the slide gets split into 2 pages when saved to pdf with renderthis::to_pdf().

For example, slide 1 below gets split into pages 2 and 3 in the pdf (after the title slide on page 1), while slide 2 is, as expected, only on page 4.

---
title: "test"
format: revealjs
---

## slide 1

![](https://allisonhorst.github.io/palmerpenguins/reference/figures/README-flipper-bill-1.png)

::: notes
-   secret note
:::

## slide 2

![](https://allisonhorst.github.io/palmerpenguins/reference/figures/README-flipper-bill-1.png)
renderthis::to_pdf("test.html")

I don't think I can insert the html into this PR, but here's the resulting pdf.

@gadenbuie
Copy link
Collaborator

If you open the rendered slides in Chrome and use Chrome's print menu to print to PDF, do you get the same thing or something different?

@tonyelhabr
Copy link
Author

hmm this functionally seems ok, although of course i don't want all the extra white space

test_pdf

@gadenbuie
Copy link
Collaborator

gadenbuie commented Jul 19, 2022

I tried your reprex and unfortunately I don't think there's anything specific that renderthis can do to help. Bascially, revealjs has a stylesheet that gets applied when printing the slides and in some cases it causes less than optimal pagination.

to_pdf() basically hands off to pagedown::chrome_print() and I do think we should allow more arguments in to_pdf() to be handed down to the underlying function (c.f. #57). But it's not clear to me which settings we would change to yield better results globally.

@tonyelhabr
Copy link
Author

I tried your reprex and unfortunately I don't think there's anything specific that renderthis can do to help. Bascially, revealjs has a stylesheet that gets applied when printing the slides and in some cases it causes less than optimal pagination.

to_pdf() basically hands off to pagedown::chrome_print() and I do think we should allow more arguments in to_pdf() to be handed down to the underlying function (c.f. #57). But it's not clear to me which settings we would change to yield better results globally.

that's ok! it's a minor inconvenience tbh. please feel free to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants