- | [t] -> t
- | _ ->
- let kind, spacing, indent = spec in
- let rec dress = function
- | [] -> []
- | [hd] -> [hd]
- | hd :: tl -> hd :: Mpresentation.Mtext ([], " ") :: dress tl
- in
- if mathonly then Mpresentation.Mrow (attrs, dress children)
- else
- let attrs' =
- if spacing then [None, "spacing", "0.5em"] else []
- @ if indent then [None, "indent", "0em 0.5em"] else []
- @ attrs
- in
- match kind with
- | CicNotationPt.H when List.for_all genuine_math children ->
- Mpresentation.Mrow (attrs', children)
- | CicNotationPt.H ->
- mpres_of_box (Box.H (attrs', List.map box_of_mpres children))
- | CicNotationPt.V ->
- mpres_of_box (Box.V (attrs', List.map box_of_mpres children))
- | CicNotationPt.HV ->
- mpres_of_box (Box.HV (attrs', List.map box_of_mpres children))
- | CicNotationPt.HOV ->
- mpres_of_box (Box.HOV (attrs', List.map box_of_mpres children))
+ | [t] -> t
+ | _ ->
+ let kind, spacing, indent = spec in
+ let dress children =
+ if spacing then
+ CicNotationUtil.dress (Mpresentation.Mtext ([], " ")) children
+ else
+ children
+ in
+ if mathonly then Mpresentation.Mrow (attrs, dress children)
+ else
+ let attrs' =
+ (if spacing then [None, "spacing", "0.5em"] else [])
+ @ (if indent then [None, "indent", "0em 0.5em"] else [])
+ @ attrs
+ in
+ match kind with
+ | CicNotationPt.H when List.for_all genuine_math children ->
+ Mpresentation.Mrow (attrs', dress children)
+ | CicNotationPt.H ->
+ mpres_of_box (Box.H (attrs', List.map box_of_mpres children))
+ | CicNotationPt.V ->
+ mpres_of_box (Box.V (attrs', List.map box_of_mpres children))
+ | CicNotationPt.HV ->
+ mpres_of_box (Box.HV (attrs', List.map box_of_mpres children))
+ | CicNotationPt.HOV ->
+ mpres_of_box (Box.HOV (attrs', List.map box_of_mpres children))