View source: R/build_usepackage.R
build_usepackage | R Documentation |
input TeX package name and optional package functions to create usepackage call
build_usepackage(pkg, options = NULL, uselibrary = NULL, chk.inst = FALSE)
pkg |
character, name of TeX package |
options |
character, name(s) of options to use in the package |
uselibrary |
character, part of document preamble to specify a uselibrary call related to package |
chk.inst |
logical, invokes a check to see if pkg is currently installed on system (default FALSE) |
if options and uselibrary are NULL (default) then only the call for the package is returned. See the TeX wikibook for more information https://en.wikibooks.org/wiki/LaTeX/Document_Structure#Packages on the usepackage command. If chk.inst finds that the package is not installed on system function returns NULL.
character
build_usepackage(pkg = 'xcolor')
build_usepackage(pkg = 'xcolor',options = 'usenames')
#build many at once using mapply
geom.opts=c('paperwidth=35cm','paperheight=35cm','left=2.5cm','top=2.5cm')
use.opts="\\usetikzlibrary{mindmap,backgrounds}"
unlist(mapply(build_usepackage,
pkg = list('times','geometry','tikz'),
options= list(NULL ,geom.opts ,NULL),
uselibrary = list(NULL ,NULL ,use.opts)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.