<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Escape Latex for Class 'latex'</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for escape_latex.latex"><tr><td>escape_latex.latex</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Escape Latex for Class 'latex'</h2>

<h3>Description</h3>

<p>Returns argument typically unmodified.
Prevents accidental double-escaping
of the same text.
</p>


<h3>Usage</h3>

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


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
<p>latex</p>
</td></tr>
<tr valign="top"><td><code>secondary</code></td>
<td>
<p>logical: whether secondary backslashes should be pre-doubled</p>
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
<p>ignored</p>
</td></tr>
</table>


<h3>Details</h3>

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


<h3>Value</h3>

<p>latex
</p>


<h3>See Also</h3>

<p>Other escape: 
<code>escape_latex.default()</code>,
<code>escape_latex()</code>
</p>


<h3>Examples</h3>

<pre>
identical(
escape_latex('([#$%&amp;_{}])'),
escape_latex(escape_latex('([#$%&amp;_{}])'))
)

</pre>


</body></html>
