Parse TeX file for usepackage calls and return a vector of the packages.
tex_requirements(
file = system.file("tmpl.tex", package = "texPreview"),
lines = NULL
)
character, Path to TeX file, Default: system.file("tmpl.tex", package = "texPreview")
character, character vector containing TeX script, Default: NULL
character
If file is NULL then function will use the the value in lines. The default path used in file is the internal template that the package uses.
tex_requirements()
#> [1] "varwidth" "xcolor" "booktabs" "multirow" "array" "helvet"
#> [7] "amsmath" "rotating" "listings" "graphicx" "setspace" "caption"