From 5994e8316c4ab219a06b735afdc94ecf5dd73f8e Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Tue, 6 Sep 2005 16:48:21 +0000 Subject: [PATCH] added {get,set}_attr --- helm/ocaml/cic_notation/mpresentation.ml | 57 +++++++++++++++++++++++ helm/ocaml/cic_notation/mpresentation.mli | 3 ++ 2 files changed, 60 insertions(+) diff --git a/helm/ocaml/cic_notation/mpresentation.ml b/helm/ocaml/cic_notation/mpresentation.ml index 69d4fd9a0..db05f31be 100644 --- a/helm/ocaml/cic_notation/mpresentation.ml +++ b/helm/ocaml/cic_notation/mpresentation.ml @@ -190,3 +190,60 @@ let document_of_mpres pres = "rowspacing", "0.6ex"] (print_mpres (fun _ -> assert false) pres)) >] +let get_attr = function + | Maction (attr, _) + | Menclose (attr, _) + | Merror (attr, _) + | Mfenced (attr, _) + | Mfrac (attr, _, _) + | Mgliph (attr, _) + | Mi (attr, _) + | Mn (attr, _) + | Mo (attr, _) + | Mobject (attr, _) + | Mover (attr, _, _) + | Mpadded (attr, _) + | Mphantom (attr, _) + | Mroot (attr, _, _) + | Mrow (attr, _) + | Ms (attr, _) + | Mspace attr + | Msqrt (attr, _) + | Mstyle (attr, _) + | Msub (attr, _, _) + | Msubsup (attr, _, _, _) + | Msup (attr, _, _) + | Mtable (attr, _) + | Mtext (attr, _) + | Munder (attr, _, _) + | Munderover (attr, _, _, _) -> + attr + +let set_attr attr = function + | Maction (_, x) -> Maction (attr, x) + | Menclose (_, x) -> Menclose (attr, x) + | Merror (_, x) -> Merror (attr, x) + | Mfenced (_, x) -> Mfenced (attr, x) + | Mfrac (_, x, y) -> Mfrac (attr, x, y) + | Mgliph (_, x) -> Mgliph (attr, x) + | Mi (_, x) -> Mi (attr, x) + | Mn (_, x) -> Mn (attr, x) + | Mo (_, x) -> Mo (attr, x) + | Mobject (_, x) -> Mobject (attr, x) + | Mover (_, x, y) -> Mover (attr, x, y) + | Mpadded (_, x) -> Mpadded (attr, x) + | Mphantom (_, x) -> Mphantom (attr, x) + | Mroot (_, x, y) -> Mroot (attr, x, y) + | Mrow (_, x) -> Mrow (attr, x) + | Ms (_, x) -> Ms (attr, x) + | Mspace _ -> Mspace attr + | Msqrt (_, x) -> Msqrt (attr, x) + | Mstyle (_, x) -> Mstyle (attr, x) + | Msub (_, x, y) -> Msub (attr, x, y) + | Msubsup (_, x, y, z) -> Msubsup (attr, x, y, z) + | Msup (_, x, y) -> Msup (attr, x, y) + | Mtable (_, x) -> Mtable (attr, x) + | Mtext (_, x) -> Mtext (attr, x) + | Munder (_, x, y) -> Munder (attr, x, y) + | Munderover (_, x, y, z) -> Munderover (attr, x, y, z) + diff --git a/helm/ocaml/cic_notation/mpresentation.mli b/helm/ocaml/cic_notation/mpresentation.mli index e322e92e1..8252517a6 100644 --- a/helm/ocaml/cic_notation/mpresentation.mli +++ b/helm/ocaml/cic_notation/mpresentation.mli @@ -66,6 +66,9 @@ and attr = (string option * string * string) list ;; +val get_attr: 'a mpres -> attr +val set_attr: attr -> 'a mpres -> 'a mpres + val smallskip : 'a mpres val indented : 'a mpres -> 'a mpres val standard_tbl_attr : attr -- 2.39.2