with Macro_not_found _ -> s
let tex_of_unicode s =
+ (*WARNING: the space below is a nbsp (0x00A0), not a normal space *)
+ if s = " " then Some ""
+ else
try
- "\\" ^ Hashtbl.find Utf8MacroTable.utf82macro s
- with Not_found -> s
+ Some ("\\" ^ Hashtbl.find Utf8MacroTable.utf82macro s)
+ with Not_found -> None