Skip to contents

Generate optional arguments to a LaTeX call.

Usage

latex_optional_arg(x = NULL, ...)

Arguments

x

A character scalar (or something that can be coerced into a character scalar)

...

Named arguments that must be present for the optional argument to work.

Value

The character scalar in square brackets, "[x]".

See also

Other Latex Arguments: latex_required_arg()

Examples

latex_optional_arg(NULL)
#> [1] ""
latex_optional_arg(x="A")
#> [1] "[A]"