and attr = (string option * string * string) list
;;
-let smallskip = Mspace([None,"width","0.1cm"]);;
-let indentation = Mspace([None,"width","0.3cm"]);;
+let smallskip = Mspace([None,"width","0.5em"]);;
+let indentation = Mspace([None,"width","1em"]);;
let indented elem =
Mrow([],[indentation;elem]);;
(* only the open bracket is added; the closed bracket must be in b *)
Mtable(attr@standard_tbl_attr,
[Mtr([],[Mtd([],Mrow([],[Mtext([],"(");a]))]);
- Mtr([],[Mtd([],Mrow([],[indentation;op;smallskip;b]))])]);;
+ Mtr([],[Mtd([],Mrow([],[indentation;op;b]))])]);;
let two_rows_table_without_brackets attr a b op =
Mtable(attr@standard_tbl_attr,
[Mtr([],[Mtd([],a)]);
- Mtr([],[Mtd([],Mrow([],[indentation;op;smallskip;b]))])]);;
+ Mtr([],[Mtd([],Mrow([],[indentation;op;b]))])]);;
let row_with_brackets attr a b op =
(* by analogy with two_rows_table_with_brackets we only add the
open brackets *)
- Mrow(attr,[Mtext([],"(");a;smallskip;op;smallskip;b])
+ Mrow(attr,[Mtext([],"(");a;op;b;Mtext([],")")])
let row_without_brackets attr a b op =
- Mrow(attr,[a;smallskip;op;smallskip;b])
+ Mrow(attr,[a;op;b])
(* MathML prefix *)
let prefix = "m";;
and print_mtd =
let module X = Xml in
function
- Mtd (attr,m) -> X.xml_nempty ~prefix "mtd" attr (print_mpres m)
+ Mtd (attr,m) -> X.xml_nempty ~prefix "mtd" attr [< (print_mpres m) ; X.xml_nempty ~prefix "mphantom" [] (X.xml_nempty ~prefix "mtext" [] (X.xml_cdata "(")) >]
;;
-let print_mpres pres =
+let document_of_mpres pres =
[< Xml.xml_cdata "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ;
Xml.xml_cdata "\n";
Xml.xml_nempty ~prefix "math"
[Some "xmlns","m","http://www.w3.org/1998/Math/MathML" ;
Some "xmlns","helm","http://www.cs.unibo.it/helm" ;
Some "xmlns","xlink","http://www.w3.org/1999/xlink"
- ] (print_mpres pres)
+ ] (Xml.xml_nempty ~prefix "mstyle" [None, "mathvariant", "normal"; None, "rowspacing", "0.6ex"] (print_mpres pres))
>]