diff --git a/NEWS.md b/NEWS.md index 5d81e25..57ee7bd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ Bug fixes * Provide default CRAN mirror if missing in install_load_cran_packages(), e.g., in a child R session during knitting. Fixes 'trying to use CRAN without setting a mirror' error (#218) * Update template.tex so that flextable package can be used to create tables in PDF documents (#226) * Clean up invalid ORCID placeholder generated by usethis 3.0.0 that threw error on R version 4.5.x (#248) +* Fix error when running skeleton.Rmd file interactively (#249) * Include pdata object name and data package name in visc_load_pdata() error message (#252) Other improvements diff --git a/inst/rmarkdown/templates/visc_empty/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/visc_empty/skeleton/skeleton.Rmd index b1cd370..aed0db2 100644 --- a/inst/rmarkdown/templates/visc_empty/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/visc_empty/skeleton/skeleton.Rmd @@ -61,7 +61,7 @@ opts_chunk$set(cache = FALSE, out.extra = "", fig.pos = "H") # fig.align argument is not supported in Word (align in template docx) -if (knitr::opts_knit$get('rmarkdown.pandoc.to') == 'latex'){ +if (get_output_type() == 'latex'){ opts_chunk$set(fig.align = "center") } diff --git a/inst/rmarkdown/templates/visc_report/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/visc_report/skeleton/skeleton.Rmd index 13f5ba0..4d6a10f 100644 --- a/inst/rmarkdown/templates/visc_report/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/visc_report/skeleton/skeleton.Rmd @@ -65,7 +65,7 @@ opts_chunk$set(cache = FALSE, out.extra = "", fig.pos = "H") # fig.align argument is not supported in Word (align in template docx) -if (knitr::opts_knit$get('rmarkdown.pandoc.to') == 'latex'){ +if (get_output_type() == 'latex'){ opts_chunk$set(fig.align = "center") }