<child>
<widget class="GtkImageMenuItem" id="showUnicodeTable">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Show the conversion table from TeX to UTF8</property>
- <property name="label" translatable="yes">Tex/UTF8 table</property>
+ <property name="tooltip" translatable="yes">Show the conversion table from TeX like sequences to UTF-8</property>
+ <property name="label" translatable="yes">TeX/UTF-8 table</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image20">
method private tex () =
let b = Buffer.create 1000 in
+ Printf.bprintf b "UTF-8 equivalence classes (rotate with ALT-L):\n\n";
+ List.iter
+ (fun l ->
+ List.iter (fun sym ->
+ Printf.bprintf b " %s" (Glib.Utf8.from_unichar sym)
+ ) l;
+ Printf.bprintf b "\n";
+ )
+ (List.sort
+ (fun l1 l2 -> compare (List.hd l1) (List.hd l2))
+ (Virtuals.get_all_eqclass ()));
+ Printf.bprintf b "\n\nVirtual keys (trigger with ALT-L):\n\n";
List.iter
(fun tag, items ->
- Printf.bprintf b "%s:\n" tag;
+ Printf.bprintf b " %s:\n" tag;
List.iter
(fun names, symbol ->
- Printf.bprintf b "\t%s\t%s\n"
+ Printf.bprintf b " \t%s\t%s\n"
(Glib.Utf8.from_unichar symbol)
(String.concat ", " names))
(List.sort
with Not_found -> []
;;
+let get_all_eqclass () =
+ let rc = ref [] in
+ Hashtbl.iter
+ (fun k v ->
+ if not (List.mem v !rc) then
+ rc := v :: !rc)
+ classes;
+ !rc
+;;
val add_eqclass: symbol list -> unit
val similar_symbols: symbol -> symbol list
+val get_all_eqclass: unit -> symbol list list
+
(* (["\\lambda";"\\"], "λ", ["logics";"letters"]) *)