]> matita.cs.unibo.it Git - helm.git/commitdiff
escape < in pango attrs
authorEnrico Tassi <enrico.tassi@inria.fr>
Sun, 17 Aug 2008 14:38:40 +0000 (14:38 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Sun, 17 Aug 2008 14:38:40 +0000 (14:38 +0000)
helm/software/matita/matitaAutoGui.ml

index a4d7ce85f1cc4d567123528f18231b7e7d36353d..23905905bf73b11f16aa1a2a05e7aa40572e399c 100644 (file)
@@ -49,8 +49,11 @@ let pp ?(size=(!font_size)) c t =
       ~what:[Cic.Rel 1] ~with_what:[Cic.Implicit None] ~where:t
   in
   (if size > 0 then "<span font_desc=\""^string_of_int size^"\">" else "") ^
-    ApplyTransformation.txt_of_cic_term ~map_unicode_to_tex:false
-      max_int [] c t^(if size > 0 then "</span>" else "")
+  (Pcre.replace ~pat:"<" ~templ:"&lt;"
+   (Pcre.replace ~pat:">" ~templ:"&gt;"
+    (ApplyTransformation.txt_of_cic_term ~map_unicode_to_tex:false
+      max_int [] c t)))^
+  (if size > 0 then "</span>" else "")
 ;;
 let pp_goal context x = 
   if x == fake_goal then "" else pp context x
@@ -110,7 +113,7 @@ let cell_of_candidate height context ?(active=false) g id c =
 let cell_of_goal height win_width context goal = 
   GMisc.label 
     ~markup:(pp_goal context goal) ~xalign:0.0 
-    ~width:(min (win_width * 60 / 100) 500) 
+    ~width:(min (win_width * 30 / 100) 500) 
     ~line_wrap:false
     ~ellipsize:`END
     ~height