Hashtbl.find Utf8MacroTable.macro2utf8 macro
with Not_found -> raise (Macro_not_found macro)
+let unicode_of_tex s =
+ try
+ if s.[0] = '\\' then
+ expand (String.sub s 1 (String.length s - 1))
+ else s
+ with Macro_not_found _ -> s
+
+let tex_of_unicode s =
+ try
+ "\\" ^ Hashtbl.find Utf8MacroTable.utf82macro s
+ with Not_found -> s
+