jhelvy / renderthis

An R package for building xaringan slides into multiple outputs, including html, pdf, png, gif, pptx, and mp4.
https://jhelvy.github.io/renderthis
Other
172 stars 12 forks source link

`renderthis::to_pdf()` is unable to capture footnotes from Quarto presentation #67

Open JauntyJJS opened 1 year ago

JauntyJJS commented 1 year ago

Hi,

I am using renderthis_0.2.0 and Quarto version 1.2.269

I have created a Quarto script called index.qmd that has the one title slide followed by one content slide. I tried to add an aside and footer on the content slide

---
title: "Title"
author: "Name"
format: 
  revealjs:
    navigation-mode: linear
---

## Quarto

Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see <https://quarto.org/docs/presentations/>.

::: aside
Some additional commentary of more peripheral interest.
:::

::: footer
My footer
:::

I have rendered the file to index.html and tried to convert it to pdf using the command

renderthis::to_pdf("index.html")

When I take a look at the pdf file, the content slide seems to have lost the footer but the aside can be seen.

For reference, this is how it looks like in html

image

and in pdf

image

Hope this is reproducible from your end.

jhelvy commented 1 year ago

I can reproduce these results. This is interesting because I actually get different results depending on if I use renderthis::to_pdf() versus Chrome. Usually they are the same as renderthis::to_pdf() is essentially printing from Chrome, but in this case the results are different, and neither are perfect replications of the slides.

renderthis::to_pdf() (cuts off the footnote as noted):

renderthis

Chrome: chrome

My immediate guess is that this may be related to #44 where content that extends beyond the visible margin from printing gets cut. In that case it's images being cut, which can be resized, but in this case I'm not sure if you can move the footer.