;RTUPSET.CAM #include tupset.cam ; < jno.cam _fn<-"rtupset.cam"; ; RecTupSet = STR -> ( STR + RecTupSet ) FUNC RecTupSet2LaTeXStrLst(r: RecTupSet): STR-list RETURN if r=={} then < "No records found" > else let ( _= pp(r), A=atributos(r), L= < a | a <- A > ) in if L==<> then < "No attributes in table" > else let (h=head(L), t=tail(L)) in < "\\begin{tabular}{", addStrSep(< "c" | a <- L >,"|"), "}\n", addStrSep(< strcat("\\bf ",a) | a <- L >,"&"), "\\\\\\hline\n", _addStrSep(< _addStrSep(< if a in dom(t) then let (x=t[a]) in (if atom(x) then x else RecTupSet2LaTeXStrLst(x)) else "" | a <- L >, "&") | t <- r >,"\\\\\\hline\n"), "\\end{tabular}\n" >; _addStrSep(l,s)= if l==<> then <> else < head(l) > ^ < < s, x > | x <- tail(l) >;