rmarkdown
rmarkdown copied to clipboard
Safer latex_dependency insertion
https://github.com/rstudio/rmarkdown/blob/ee69d59f8011ad7b717a409fcbf8060d6ffc4139/R/latex_dependencies.R#L48-L59
I wonder if it would be ok to use safer inclusion to avoid potential conflict if this is used in a document where the is already loaded package 🤔
Using \@ifpackageloaded{pkgname}{}{\usepackage[options]{name}}
If a package needs options to be set though, there is not really a good way to avoid option conflict, unless this is loaded before documentclass
with \PassOptionsToPackage{options}{pkgname}
Anyhow, I feel latex_dependency
is not that much used, and if it would be it need to be safer.
For thoughts...