Function crowbook_text_processing::escape::tex [] [src]

pub fn tex<'a, S: Into<Cow<'a, str>>>(input: S) -> Cow<'a, str>

Escape characters for LaTeX

Example

use crowbook_text_processing::escape;
let s = escape::tex("command --foo # calls command with option foo");
assert_eq!(&s, r"command -{}-foo \# calls command with option foo");