X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fwww%2Flambdadelta%2Fbin%2Fxhtbl%2FtextUnparser.ml;h=cf7724cdd64c819f93a3efedef6ebed832c19280;hb=a5a7eb39b9bad97d52d836ad1401329cff5b58a3;hp=fec699bcbad3ac63d0d8936977778944d1d630be;hpb=cb0d4e730bd6ec9bed1018be37748120f740f0a9;p=helm.git diff --git a/helm/www/lambdadelta/bin/xhtbl/textUnparser.ml b/helm/www/lambdadelta/bin/xhtbl/textUnparser.ml index fec699bcb..cf7724cdd 100644 --- a/helm/www/lambdadelta/bin/xhtbl/textUnparser.ml +++ b/helm/www/lambdadelta/bin/xhtbl/textUnparser.ml @@ -41,12 +41,20 @@ let border tb = let css tc = P.sprintf "\"%s\"" (S.concat " " tc) +let uri tu tx = + P.sprintf "@\"%s\" \"%s\"" tu tx + +let name tn = + P.sprintf "$\"%s\"" tn + + let text = function - | T.Plain s -> P.sprintf "\"%s\"" s - | T.Link (uri, s) -> P.sprintf "@(\"%s\" \"%s\")" uri s + | T.Plain s -> P.sprintf "\"%s\"" s + | T.Link (true, uri, s) -> P.sprintf "@(\"%s\" \"%s\")" uri s + | T.Link (false, uri, s) -> P.sprintf "@@(\"%s\" \"%s\")" uri s let key = function - | T.Text sl -> S.concat " + " (L.map text sl) + | T.Text sl -> S.concat " ^ " (L.map text sl) | T.Glue None -> "*" | T.Glue (Some i) -> P.sprintf "%u" i @@ -58,8 +66,8 @@ let entry = function let open_table st t = let str = - P.sprintf "%s[{#%u: %s; %s; %s}\n" - (indent st) t.T.ti (size t.T.ts) (border t.T.tb) (css t.T.tc) + P.sprintf "%s[{#%u: %s; %s; %s; %s; %s}\n" + (indent st) t.T.ti (size t.T.ts) (border t.T.tb) (css t.T.tc) (uri t.T.tu t.T.tx) (name t.T.tn) in st.out str; add st