match t with
| Mpresentation.Mobject (_, box) ->
mpres_of_box (Box.H ([], [ open_box_paren; box; closed_box_paren ]))
match t with
| Mpresentation.Mobject (_, box) ->
mpres_of_box (Box.H ([], [ open_box_paren; box; closed_box_paren ]))
end else
((*prerr_endline ("NOT adding parens around: "^
BoxPp.render_to_string (function x::_->x|_->assert false)
~map_unicode_to_tex:false 80 t);*)t)
end else
((*prerr_endline ("NOT adding parens around: "^
BoxPp.render_to_string (function x::_->x|_->assert false)
~map_unicode_to_tex:false 80 t);*)t)
-let lookup_uri ids_to_uris id =
- try
- let uri = Hashtbl.find ids_to_uris id in
- Some (UriManager.string_of_uri uri)
- with Not_found -> None
-;;
-
-let render ~lookup_uri ?(prec=(-1)) =
+let render status ~lookup_uri ?(prec=(-1)) =
let local_context l =
box_of mathonly (A.H, false, false) []
([ Mpres.Mtext ([], "[") ] @
let local_context l =
box_of mathonly (A.H, false, false) []
([ Mpres.Mtext ([], "[") ] @
let attrs = make_href xmlattrs xref in
(match l with
| `Symbol s -> Mpres.Mo (attrs, to_unicode s)
let attrs = make_href xmlattrs xref in
(match l with
| `Symbol s -> Mpres.Mo (attrs, to_unicode s)
| A.Box ((_, spacing, _) as kind, terms) ->
let children =
aux_children mathonly spacing xref prec
| A.Box ((_, spacing, _) as kind, terms) ->
let children =
aux_children mathonly spacing xref prec
(List.map (fun (k,v) -> None,k,v) l,
box_of mathonly (A.H, false, false) attrs
(aux_children mathonly false xref prec
(List.map (fun (k,v) -> None,k,v) l,
box_of mathonly (A.H, false, false) attrs
(aux_children mathonly false xref prec
| A.Mpadded (l,terms) ->
Mpres.Mpadded
(List.map (fun (k,v) -> None,k,v) l,
box_of mathonly (A.H, false, false) attrs
(aux_children mathonly false xref prec
| A.Mpadded (l,terms) ->
Mpres.Mpadded
(List.map (fun (k,v) -> None,k,v) l,
box_of mathonly (A.H, false, false) attrs
(aux_children mathonly false xref prec
| A.Maction alternatives ->
toggle_action (List.map invoke_reinit alternatives)
| A.Group terms ->
let children =
aux_children mathonly false xref prec
| A.Maction alternatives ->
toggle_action (List.map invoke_reinit alternatives)
| A.Group terms ->
let children =
aux_children mathonly false xref prec
in
box_of mathonly (A.H, false, false) attrs children
| A.Break -> assert false (* TODO? *)
in
box_of mathonly (A.H, false, false) attrs children
| A.Break -> assert false (* TODO? *)