X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Fmatita%2FapplyTransformation.ml;h=f761a153b5a839df843d61fd9ca21db2abf6fcef;hp=df366a9ae633bd032ed2363ea25679c85c8a953c;hb=aad5588b82d0f2991c336f7ac2f3fadd76768eeb;hpb=b8a04566e67338e7e5375ff4175277704cd16432 diff --git a/matita/matita/applyTransformation.ml b/matita/matita/applyTransformation.ml index df366a9ae..f761a153b 100644 --- a/matita/matita/applyTransformation.ml +++ b/matita/matita/applyTransformation.ml @@ -96,3 +96,15 @@ class status = method ppobj obj = snd (ntxt_of_cic_object ~map_unicode_to_tex:false 80 self obj) end + +let notation_pp_term status term = + let to_pres = Content2pres.nterm2pres ?prec:None in + let content = term in + let size = 80 in + let ids_to_nrefs = Hashtbl.create 1 in + let pres = to_pres status ~ids_to_nrefs content in + let pres = CicNotationPres.mpres_of_box pres in + BoxPp.render_to_string ~map_unicode_to_tex:(Helm_registry.get_bool "matita.paste_unicode_as_tex") + (function x::_ -> x | _ -> assert false) size pres + +let _ = NotationPp.set_pp_term (fun status y -> snd (notation_pp_term (Obj.magic status) y))