escape_contents: Escape or unescape text in cells

View source: R/properties-cell.R

escape_contentsR Documentation

Escape or unescape text in cells

Description

Setting escape_contents to FALSE allows you to include raw HTML or TeX code in your cells.

Usage

escape_contents(ht)

escape_contents(ht) <- value

set_escape_contents(ht, row, col, value)

map_escape_contents(ht, row, col, fn)

Arguments

ht

A huxtable.

value

A logical vector or matrix. Set to NA to reset to the default, which is TRUE.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

fn

A mapping function. See mapping-functions for details.

Details

If markdown() is TRUE for a cell, the escape_contents property will be ignored.

See Also

sanitize() for escaping text manually.

Examples

ht <- huxtable(
  Text   = "x squared",
  Maths  = "$x^2$"
)
ht <- set_escape_contents(ht, FALSE)
## Not run: 
quick_pdf(ht)

## End(Not run)


huxtable documentation built on Aug. 19, 2025, 1:12 a.m.