1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Table Module Natural Tables Extensions}
15
16\unprotect
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
49
50
51
52
53
54
55
56
57
58
59
60\newconditional\c_tabl_nte_in_nc
61
62\unexpanded\def\startTABLE
63 {\dosingleempty\tabl_nte_start}
64
65\def\tabl_nte_start[#1]
66 {\bgroup
67 \bTABLE[#1]
68 \let\NC\tabl_nte_start_nc
69 \let\NR\tabl_nte_start_nr
70 \let\bTR\relax
71 \let\bTD\relax
72 \let\bTH\relax
73 \let\bTN\relax}
74
75\unexpanded\def\stopTABLE
76 {\eTABLE
77 \egroup}
78
79\unexpanded\def\tabl_nte_start_nr
80 {\eTR
81 \setfalse\c_tabl_nte_in_nc}
82
83\unexpanded\def\tabl_nte_start_nc
84 {\futurelet\nexttoken\tabl_nte_start_nc_indeed}
85
86\def\tabl_nte_start_nc_indeed
87 {\ifx\nexttoken\tabl_nte_start_nr \else
88 \expandafter\tabl_nte_start_nc_finish
89 \fi}
90
91\def\tabl_nte_start_nc_finish#1\NC
92 {\ifconditional\c_tabl_nte_in_nc \else
93 \settrue\c_tabl_nte_in_nc
94 \dobTR[]
95 \fi
96 \dobTD#1\eTD\NC}
97
98
99
100\unexpanded\def\startTABLEhead{\dosingleempty\tabl_nte_start_head} \let\stopTABLEhead\relax
101\unexpanded\def\startTABLEnext{\dosingleempty\tabl_nte_start_next} \let\stopTABLEnext\relax
102\unexpanded\def\startTABLEbody{\dosingleempty\tabl_nte_start_body} \let\stopTABLEbody\relax
103\unexpanded\def\startTABLEfoot{\dosingleempty\tabl_nte_start_foot} \let\stopTABLEfoot\relax
104
105\def\tabl_nte_start_head[#1]#2\stopTABLEhead{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_head}
106\def\tabl_nte_start_next[#1]#2\stopTABLEnext{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_next}
107\def\tabl_nte_start_body[#1]#2\stopTABLEbody{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_body}
108\def\tabl_nte_start_foot[#1]#2\stopTABLEfoot{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_foot}
109
110\protect \endinput
111 |