]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/lambdadelta/bin/xhtbl/matrix.ml
update in basic_2
[helm.git] / helm / www / lambdadelta / bin / xhtbl / matrix.ml
index 62f6b194e73d35e54b64e19ce6769cd16b23f920..1c65c50043fe17fa2b070acb70063f45712c1e74 100644 (file)
@@ -7,7 +7,8 @@ type cell = {
    ck: T.text list; (* contents *)
    cc: T.css;       (* css classes *)
    cu: T.uri;       (* uri *)
-   cx: T.ext;       (* extension *)   
+   cx: T.ext;       (* extension *)
+   cn: T.anchor;    (* named anchor *)   
    cb: T.border;    (* border *)
 }
 
@@ -17,8 +18,10 @@ type matrix = {
    m: cell array array; (* matrix *)
 }
 
+let strand a b = if a = "" then b else a
+
 let empty = {
-   ck = []; cc = []; cu = ""; cx = ""; cb = T.border false;
+   ck = []; cc = []; cu = ""; cx = ""; cn = ""; cb = T.border false;
 }
 
 let make ts = {
@@ -29,11 +32,12 @@ let make ts = {
 let set_key m y x kl = 
    m.m.(y).(x) <- {m.m.(y).(x) with ck = kl}
 
-let set_attrs m y x c u e = 
+let set_attrs m y x c u e 
    m.m.(y).(x) <- {m.m.(y).(x) with
       cc = c @ m.m.(y).(x).cc;
       cu = u ^ m.m.(y).(x).cu;
       cx = m.m.(y).(x).cx ^ e;
+      cn = strand m.m.(y).(x).cn n;
    }
 
 let set_west m y x b =