Utilities | R Documentation |
Miscellaneous utilities
drop_items(items, which)
select_items(items, which)
drop_whitespace(items)
trim_whitespace(items)
include_whitespace(items, which)
split_chars(item, split = "")
new_block(...)
new_env(name, ...)
items |
A LaTeX2 object or list of items, or a LaTeX2item which is a list. |
which |
A LaTeX2range object describing which items to operate on, or a vector of indices into |
item |
A non-list LaTeX2item. |
split |
Where to split the characters. |
... |
Items to be passed to |
name |
The desired environment name. |
drop_items()
returns the list of items with specific items removed.
select_items()
returns the list of subsetted items.
drop_whitespace()
returns the items with
whitespace (blanks, tabs, newlines) removed.
trim_whitespace()
returns the items with
leading and trailing whitespace (blanks, tabs, newlines) removed.
include_whitespace()
returns which
with
following whitespace (blanks, tabs, newlines) included.
split_chars()
returns a LaTeX2
list containing the result of calling strsplit
on the text of the item
.
new_block()
returns a BLOCK
item containing the items.
new_env()
returns an environment item containing the other items.
drop_whitespace()
will drop the whitespace that separates text items, so deparsing will merge
them into a single item.
drop_whitespace()
does not act recursively; use reduce_whitespace for that.
parsed <- parseLatex("Hello")
unclass(parsed)
unclass(split_chars(parsed[[1]]))
new_block(parseLatex("abc"))
new_env("itemize", parseLatex("\\item An item"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.