escape_latex.latex: Escape Latex for Class 'latex'

escape_latex.latexR Documentation

Escape Latex for Class 'latex'

Description

Returns argument typically unmodified. Prevents accidental double-escaping of the same text.

Usage

## S3 method for class 'latex'
escape_latex(x, secondary = TRUE, ...)

Arguments

x

latex

secondary

logical: whether secondary backslashes should be pre-doubled

...

ignored

Details

This function is used in as_kable.tablet in preparation for a call to kbl. At kableExtra 1.3.4, sim_double_escape() only doubles primary (leading) backslashes; the secondary argument by default pre-doubles later backslashes to prevent certain display errors. Behavior may change if kableExtra changes.

Value

latex

See Also

Other escape: escape_latex.default(), escape_latex()

Examples

identical(
escape_latex('([#$%&_{}])'),
escape_latex(escape_latex('([#$%&_{}])'))
)


tablet documentation built on April 30, 2022, 1:07 a.m.