From 3d2e55582cccbb0314850356139bd0d6171ea2c8 Mon Sep 17 00:00:00 2001 From: Florian Angeletti Date: Fri, 6 Jan 2023 15:11:59 +0100 Subject: [PATCH] latex: escape all special characters --- src/latex/raw.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/latex/raw.ml b/src/latex/raw.ml index ccc422bbb4..8bd1bfee4a 100644 --- a/src/latex/raw.ml +++ b/src/latex/raw.ml @@ -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