options | R Documentation |
Many Latex environments and macros take optional parameters
wrapped in square brackets. find_bracket_options
finds those,
assuming they come immediately after the macro.
Some Latex environments and macros take optional parameters
wrapped in curly brackets (braces). find_brace_options
finds those
if they immediately follow the environment or macro (and possibly
some bracketed options).
find_bracket_options(items, which = 1, start = 1)
bracket_options(items, which = 1, start = 1)
bracket_options(items, which = 1, start = 1, asis = FALSE) <- value
find_brace_options(items, which = 1, start = 1)
brace_options(items, which = 1, start = 1)
brace_options(items, which = 1, start = 1, asis = FALSE) <- value
items |
A list of latex items. |
which |
Which options do you want? Some macros support more than one set. |
start |
Start looking at |
asis |
Should newlines be added around the value? |
value |
The content to be inserted into the cell. This can be a LaTeX2 object, or a character string that will be converted to one. |
find_bracket_options
returns indices into items
of the options (including the
brackets).
bracket_options
returns a LaTeX2 object containing
the specified options.
find_brace_options
returns the index of the block containing the options.
brace_options
returns a LaTeX2 object containing
the specified options.
parsed <- parseLatex("\\section[a]{b}")
macro <- find_macro(parsed, "\\section")
bracket_options(parsed, start = macro + 1)
bracket_options(parsed, start = macro + 1) <- "Short Title"
parsed
brace_options(parsed, start = macro + 1)
brace_options(parsed, start = macro + 1) <- "Long Title"
parsed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.