rstudio / rmarkdown

Dynamic Documents for R
https://rmarkdown.rstudio.com
GNU General Public License v3.0
2.87k stars 971 forks source link

feat(beamer): support latex_dependencies #2558

Closed atusy closed 3 months ago

atusy commented 3 months ago

closes #2478

Confirmed it works by the following script.

writeLines(
  c(
    '```{r}',
    'knitr::asis_output("", meta = list(rmarkdown::latex_dependency("longtable")))',
    '```',
    '\\begin{longtable}{r|r} \\hline speed & dist\\\\ \\hline 4 & 2\\\\ \\end{longtable}'
  ),
  "example.Rmd"
)

render("example.Rmd", beamer_presentation())
atusy commented 3 months ago

@cderv Thanks for the suggestion. I added test cases for pre_processors of pdf_document and beamer_presentation.