function
[] -> []
| [(s,t)] ->
- make_subst start_txt s t "]"
+ make_subst start_txt s t ""
| (s,t)::tl ->
- (make_subst start_txt s t ";")@(make_substs " " tl)
+ (make_subst start_txt s t ";")@(make_substs "" tl)
in
match subst with
- | Some subst -> make_substs ((map_tex unicode "subst") ^ "[") subst
- | None -> []
+ | Some subst ->
+ Box.H([],
+ [Box.Text(make_std_attributes xref,s);
+ Box.Action([],
+ [Box.Text([],"[...]");
+ Box.H([], [Box.Text([], map_tex unicode "subst" ^ "[");
+ Box.V([], make_substs "" subst);
+ Box.Text([], "]")])])])
+ | None -> Box.Text(make_std_attributes xref, s)
in
- Box.V([], (* attr here or on Vbox? *)
+ subst
+ (*
+ Box.H([], (* attr here or on Vbox? *)
[Box.Text(make_std_attributes xref,s);
- Box.indent(Box.V([],subst))])
+ Box.Action([], [Box.Text([], "[_]"); Box.V([],subst)])])
+ (* Box.indent(Box.V([],subst))]) *)
+ *)
| A.Implicit ->
Box.Text([],"_") (* big? *)
| A.Meta (n, l) ->
and make_subst start_txt varname body end_txt =
pretty_append ~tail:[end_txt]
- [Box.Text([],start_txt);
- Box.Text([],varname);
- Box.smallskip;
- Box.Text([],map_tex unicode "Assign")
- ]
+ ((if start_txt <> "" then [Box.Text([],start_txt)] else [])@
+ [Box.Text([],varname);
+ Box.smallskip;
+ Box.Text([],map_tex unicode "Assign")
+ ])
body
and pretty_append ~tail l ast =