1 (* Copyright (C) 2000, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
26 (***************************************************************************)
30 (* Andrea Asperti <asperti@cs.unibo.it> *)
33 (***************************************************************************)
35 let p_mtr a b = Mpresentation.Mtr(a,b)
36 let p_mtd a b = Mpresentation.Mtd(a,b)
37 let p_mtable a b = Mpresentation.Mtable(a,b)
38 let p_mtext a b = Mpresentation.Mtext(a,b)
39 let p_mi a b = Mpresentation.Mi(a,b)
40 let p_mo a b = Mpresentation.Mo(a,b)
41 let p_mrow a b = Mpresentation.Mrow(a,b)
42 let p_mphantom a b = Mpresentation.Mphantom(a,b)
43 let b_ink a = Box.Ink a
46 module P = Mpresentation
48 let sequent2pres term2pres (_,_,context,ty) =
49 let context2pres context =
53 | None::tl -> aux accum tl
54 | (Some (`Declaration d))::tl ->
56 { K.dec_name = dec_name ;
58 K.dec_type = ty } = d in
60 Box.b_h [Some "helm", "xref", dec_id]
61 [ Box.b_object (p_mi []
68 | (Some (`Definition d))::tl ->
70 { K.def_name = def_name ;
72 K.def_term = bo } = d in
74 Box.b_h [Some "helm", "xref", def_id]
75 [ Box.b_object (p_mi []
79 Box.b_text [] (Utf8Macro.unicode_of_tex "\\def") ;
82 | _::_ -> assert false in
84 let pres_context = (Box.b_v [] (context2pres context)) in
85 let pres_goal = term2pres ty in
91 b_ink [None,"width","4cm"; None,"height","2px"]; (* sequent line *)
95 let sequent2pres ~ids_to_inner_sorts =
98 let ast, ids_to_uris =
99 TermAcicContent.ast_of_acic ids_to_inner_sorts annterm
101 CicNotationPres.box_of_mpres
102 (CicNotationPres.render ids_to_uris
103 (TermContentPres.pp_ast ast)))