escapeLatexSpecials: Escape special LaTeX characters for use in LaTeX labels

View source: R/tex-utils.R

escapeLatexSpecialsR Documentation

Escape special LaTeX characters for use in LaTeX labels

Description

Escape special LaTeX characters for use in LaTeX labels

Usage

escapeLatexSpecials(x)

Arguments

x

String or vector of strings.

Value

String or vector of strings with all occurences of "#", "$", "%", "&", "~", "_", "^", ">", "<" replaced by escaped counterparts which should render fine when used in a tikz plot, for example.

References

from https://stackoverflow.com/questions/36338629/escaping-special-latex-characters-in-r


hadron documentation built on Sept. 9, 2022, 5:06 p.m.