Learn R Programming

tablet (version 0.6.8)

escape_latex.latex: Escape Latex for Class 'latex'

Description

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

Usage

# S3 method for latex
escape_latex(x, secondary = TRUE, primary = FALSE, ...)

Value

latex

Arguments

x

latex

secondary

logical: whether first 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.

See Also

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

Examples

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

Run the code above in your browser using DataLab