Skip to content

Commit 3d2e555

Browse files
Octachronjonludlam
authored andcommitted
latex: escape all special characters
1 parent ffdfac8 commit 3d2e555

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/latex/raw.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ module Escape = struct
4646
for i = 0 to String.length s - 1 do
4747
match s.[i] with
4848
| '~' -> Fmt.pf ppf "+t+"
49+
| '&' -> Fmt.pf ppf "+a+"
50+
| '^' -> Fmt.pf ppf "+c+"
51+
| '%' -> Fmt.pf ppf "+p+"
52+
| '{' -> Fmt.pf ppf "+ob+"
53+
| '}' -> Fmt.pf ppf "+cb+"
4954
| '+' -> Fmt.pf ppf "+++"
5055
| c -> Fmt.pf ppf "%c" c
5156
done

0 commit comments

Comments
 (0)