path_to | R Documentation |
Find path to a particular kind of item
path_to(items, is_fn, ..., all = FALSE)
get_item(items, path)
set_item(items, path, value)
get_container(items, path)
get_which(path)
items |
A list of latex items. |
is_fn |
Which test function to use. |
... |
Additional parameters to pass to |
all |
Find all matching, or the first? |
path |
Integer vector of subitems |
value |
A LaTeX2item to set as a value. |
path_to()
does a recursive search in the order
items appear in the deparse.
path_to()
returns the recursive path to the
first example matching the is_fn
conditions,
or a list of paths to all matching items.
get_item()
returns the item at the given path.
set_item()
replaces the item at the given path, and returns the modified version of items
.
get_container()
returns the item
containing the given path
get_which()
returns the index
of the item within its container.
latex <- kableExtra::kbl(mtcars[1:2, 1:2], format = "latex", caption = "Sample table")
parsed <- parseLatex(latex)
parsed
path <- path_to(parsed, is_fn = is_env,
envtypes = "tabular")
get_item(parsed, path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.