Skip to content

Commit

Permalink
latex: escape all special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Octachron authored and jonludlam committed Jan 10, 2023
1 parent ffdfac8 commit 3d2e555
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/latex/raw.ml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ module Escape = struct
for i = 0 to String.length s - 1 do
match s.[i] with
| '~' -> Fmt.pf ppf "+t+"
| '&' -> Fmt.pf ppf "+a+"
| '^' -> Fmt.pf ppf "+c+"
| '%' -> Fmt.pf ppf "+p+"
| '{' -> Fmt.pf ppf "+ob+"
| '}' -> Fmt.pf ppf "+cb+"
| '+' -> Fmt.pf ppf "+++"
| c -> Fmt.pf ppf "%c" c
done
Expand Down

0 comments on commit 3d2e555

Please sign in to comment.