Professional PDF report engine for structural engineering calculations and drawing sheets — equations, tables, charts, Arch sizes, and title blocks via Typst.
/// Escape Typst special characters in plain text content.
/// Math strings must NOT be passed through this — they are placed inside `$...$` verbatim.
pub(crate)fnescape_text(s:&str)-> String{letmut out =String::with_capacity(s.len());for ch in s.chars(){match ch {'#'|'@'|'_'|'*'|'['|']'|'<'|'>'|'\\'|'~'|'`'=>{
out.push('\\');
out.push(ch);}_=> out.push(ch),}}
out
}