-
Notifications
You must be signed in to change notification settings - Fork 86
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
background images not found when using output_dir #54
Comments
As seen in #39, currently This is an issue with pandoc itself I believe. Tested with Quarto ---
title: "Untitled"
format:
revealjs:
self-contained: true
---
# Important {data-background="background.jpg"}
This is the first slide. it will style have this html part <section id="important" class="slide level1 present" data-background="background.jpg" style="top: 240.5px; display: block;" data-background-image="background.jpg">
<h1 data-background="background.jpg">Important</h1>
<!-- (...) -->
</section> The background image is processed by reveal.js itself, so I don't know if encoding it would work. This is a Pandoc thing. About
The fact that Anyway I need to dig further in how rmarkdown works for those file in order to see what should be done with revealjs. But we will certainly need special handling of external resources passed as attributes for |
I think only the solution is base64 encoding outside Pandoc or by filters.
|
Yep regarding the self-contained mode, if that works with reveal.js then it is a solution we could use I guess. I had that in mind, but did not try it yet. Thanks! I still think that it could be an issue in Pandoc and Regarding not self-contained, I think we can do differently and not encode the image but detect and move as the other resources. |
I think I solved the mystery in #39 The attributes to use is
I believe it is worth using the long form. |
To be complete, here is an example ---
title: "Untitled"
output:
revealjs::revealjs_presentation:
self_contained: true
---
# Important {data-background-image="`r system.file("img", "Rlogo.png", package = "png")`"}
This is the first slide. This works with revealjs < 4.1.0 because there is an issue with last version introduced in 4.1.1 (tracked in #137) |
Similar to #39.
Given a presentation:
When rendering:
an
destination/index.html
file is created, therstudio.png
is referenced but not found (because the reference cannot resolve).Things are not improved by rendering
self_contained=TRUE
.Also related is that
rmarkdown::find_external_resources
does not findrstudio.png
. Adding this file as arender_files
entry does not help, either.The text was updated successfully, but these errors were encountered: