- m#load_root ~root:mathml#get_documentElement;
- let pixmap = m#get_buffer in
- let pixbuf = GdkPixbuf.create ~width ~height () in
- GdkPixbuf.get_from_drawable ~dest:pixbuf pixmap;
- let filename = filename ^ "-raw.png" in
- GdkPixbuf.save ~filename ~typ:"png" pixbuf;
+ let filenames =
+ HExtlib.list_mapi
+ (fun sequent i ->
+ let mathml =
+ ApplyTransformation.nmml_of_cic_sequent
+ status metasenv subst sequent
+ in
+ m#load_root ~root:mathml#get_documentElement;
+ let pixmap = m#get_buffer in
+ let pixbuf = GdkPixbuf.create ~width ~height () in
+ GdkPixbuf.get_from_drawable ~dest:pixbuf pixmap;
+ let filename =
+ filename ^ "-raw" ^ string_of_int i ^ ".png"
+ in
+ GdkPixbuf.save ~filename ~typ:"png" pixbuf;
+ filename)
+ sequents
+ in
+ let items =
+ List.map (fun x ->
+ Printf.sprintf
+ " '(' -trim -border 3 -bordercolor white %s ')' "
+ (Filename.quote x))
+ filenames
+ in