let b_indent = indent
let b_space = Space [None, "width", "0.5em"]
let b_kw = b_text (RenderingAttrs.object_keyword_attributes `BoxML)
+let b_toggle items = Action ([ None, "type", "toggle"], items)
let pp_attr attr =
let pp (ns, n, v) =
val b_indent: 'expr box -> 'expr box
val b_space: 'expr box
val b_kw: string -> 'expr box
+val b_toggle: 'expr box list -> 'expr box (** action which toggle among items *)
val pp_attr: attr -> string
match concl with
None -> body
| Some ac ->
- B.Action
- ([None,"type","toggle"],
- [(make_concl ~attrs:[Some "helm", "xref", p.Con.proof_id]
- "proof of" ac); body])
+ let concl =
+ make_concl ~attrs:[ Some "helm", "xref", p.Con.proof_id ]
+ "proof of" ac in
+ B.b_toggle [ concl; body ]
in
B.V ([],
[B.Text ([],"(" ^ name ^ ")");
let counter = ref 0
let conjecture2pres term2pres (id, n, context, ty) =
- (B.b_h [Some "helm", "xref", id]
- (((List.map
+ B.b_indent
+ (B.b_hv [Some "helm", "xref", id]
+ ((B.b_toggle [
+ B.b_h [] [B.b_text [] "{...}"; B.b_space];
+ B.b_hv [] (List.map
(function
| None ->
B.b_h []
| Some n -> n)) ;
B.b_text [] (Utf8Macro.unicode_of_tex "\\Assign");
proof2pres term2pres p])
- (List.rev context)) @
- [ B.b_text [] (Utf8Macro.unicode_of_tex "\\vdash");
- B.b_object (p_mi [] (string_of_int n)) ;
- B.b_text [] ":" ;
- term2pres ty ])))
+ (List.rev context)) ] ::
+ [ B.b_h []
+ [ B.b_text [] (Utf8Macro.unicode_of_tex "\\vdash");
+ B.b_object (p_mi [] (string_of_int n)) ;
+ B.b_text [] ":" ;
+ term2pres ty ]])))
let metasenv2pres term2pres = function
| None -> []
type xml_attribute = string option * string * string
type markup = [ `MathML | `BoxML ]
+let color1 = "blue"
+(* let color2 = "red" *)
+let color2 = "blue"
+
let keyword_attributes = function
- | `MathML -> [ None, "mathcolor", "blue" ]
- | `BoxML -> [ None, "color", "blue" ]
+ | `MathML -> [ None, "mathcolor", color1 ]
+ | `BoxML -> [ None, "color", color1 ]
let builtin_symbol_attributes = function
- | `MathML -> [ None, "mathcolor", "blue" ]
- | `BoxML -> [ None, "color", "blue" ]
+ | `MathML -> [ None, "mathcolor", color1 ]
+ | `BoxML -> [ None, "color", color1 ]
let object_keyword_attributes = function
- | `MathML -> [ None, "mathcolor", "red" ]
- | `BoxML -> [ None, "color", "red" ]
+ | `MathML -> [ None, "mathcolor", color2 ]
+ | `BoxML -> [ None, "color", color2 ]
let symbol_attributes _ = []
let ident_attributes _ = []