We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
An image of type pdf does not display on a slide either when using
pdf
knitr::include_graphics()
or markdown,
![]()
Here's an example:
--- title: "Untitled" output: revealjs::revealjs_presentation: default --- # Slide with Plot ```{r, echo=FALSE} pdf("myplot.pdf") plot(x = 1:10, y = 1:10) dev.off() ``` # load image using knitr ```{r} knitr::include_graphics("myplot.pdf") ``` # load image using markdown ![](myplot.pdf)
Here's information from xfun::session_info('revealjs') my session?
xfun::session_info('revealjs')
R version 4.1.2 (2021-11-01) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.1, RStudio 2021.9.1.372 Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8 Package version: base64enc_0.1.3 digest_0.6.29 evaluate_0.14 fastmap_1.1.0 glue_1.6.0 graphics_4.1.2 grDevices_4.1.2 highr_0.9 htmltools_0.5.2 jquerylib_0.1.4 jsonlite_1.7.2 knitr_1.37 magrittr_2.0.1 methods_4.1.2 revealjs_0.9.1.9007 rlang_0.4.12 rmarkdown_2.11 stats_4.1.2 stringi_1.7.6 stringr_1.4.0 tinytex_0.36 tools_4.1.2 utils_4.1.2 xfun_0.29 yaml_2.2.1
I've upgraded all packages and tested the issue on the development version.
The text was updated successfully, but these errors were encountered:
Thanks for the report. It seems like and issue with Pandoc
Using
❯ echo "![](myplot.pdf)" | pandoc -t revealjs <section class="slide level6"> <p><embed data-src="myplot.pdf" /></p> </section> ❯ echo "![](myplot.pdf)" | pandoc -t html <p><embed src="myplot.pdf" /></p>
<embed> needs a src attribute and not a data-src. The latter is used for revealjs and this make the element not work.
<embed>
src
data-src
It could be a special treatment by revealjs for Lazy Loading but it does not seem to work for embed element. https://github.com/hakimel/reveal.js/blob/f7c59649fe9d72a148860220a66511cefd142907/js/controllers/slidecontent.js#L52-L59
embed
Sorry, something went wrong.
I have opened an issue in Pandoc jgm/pandoc#7830
No branches or pull requests
An image of type
pdf
does not display on a slide either when usingknitr::include_graphics()
or markdown,
![]()
Here's an example:
Here's information from
xfun::session_info('revealjs')
my session?I've upgraded all packages and tested the issue on the development version.
The text was updated successfully, but these errors were encountered: