1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
% engine=luatex
\usemodule[x][cals]
\setupcolors[state=start]
\startsetups cdx:cals:table:noframe
\setupTABLE[frame=off]
\stopsetups
\startsetups cdx:cals:table:colors
\setupTABLE[row] [odd] [frame=off,background=color,backgroundcolor=red]
\setupTABLE[row] [even][frame=off,background=color,backgroundcolor=green]
\setupTABLE[column][2] [frame=off,background=color,backgroundcolor=blue]
\stopsetups
\startsetups cdx:cals:table:vertical
\setupTABLE[row] [odd] [frame=off,background=color,backgroundcolor=lightblue]
\stopsetups
\startsetups cdx:cals:table:horizontal
\setupTABLE[column] [odd] [frame=off,background=color,backgroundcolor=lightblue]
\stopsetups
\startsetups cdx:cals:table:before:frame
\framed [offset=overlay,frame=off,topframe=on,bottomframe=on,rulethickness=2pt,framecolor=red,align=normal] \bgroup
\vskip2pt
\framed [offset=overlay,frame=off,leftframe=on,rightframe=on,rulethickness=1pt,framecolor=red,align=normal] \bgroup
\stopsetups
\startsetups cdx:cals:table:after:frame
\egroup
\vskip2pt
\egroup
\stopsetups
% \startxmlsetups xml:cals:process
% \xmlsetsetup {\xmldocument} {cals:table} {*}
% \stopxmlsetups
% \startxmlsetups cals:table
% \ctxlua{lxml.cals.table("#1")}
% \stopxmlsetups
% \xmlregistersetup{xml:cals:process}
\starttext
\xmlloaddirectives{x-cals-test.cdx}
\xmlprocess{main}{x-cals-test.xml}{}
\stoptext
|