catc-xml.mkiv /size: 5501 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=catc-xml,
3
%D version=2006.09.18,
4
%D title=\CONTEXT\ Catcode Macros,
5
%D subtitle=\XML\ Catcode Tables,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\writestatus
{
loading
}{
ConTeXt
Catcode
Regimes
/
XML
}
15 16
\ifdefined
\xmlcatcodesn
\else
\newcatcodetable
\xmlcatcodesn
\fi
% normal
17
\ifdefined
\xmlcatcodese
\else
\newcatcodetable
\xmlcatcodese
\fi
% entitle
18
\ifdefined
\xmlcatcodesr
\else
\newcatcodetable
\xmlcatcodesr
\fi
% reduce
19 20
\startcatcodetable
\xmlcatcodesn
21
\catcode
\tabasciicode
\spacecatcode
22
\catcode
\endoflineasciicode
\endoflinecatcode
23
\catcode
\formfeedasciicode
\endoflinecatcode
24
\catcode
\spaceasciicode
\spacecatcode
25
\catcode
\endoffileasciicode
\ignorecatcode
26
\catcode
\ampersandasciicode
\activecatcode
27
\catcode
`
\<
\activecatcode
28
\catcode
`
\>
\othercatcode
29
\catcode
`
\"
\othercatcode
% probably not needed any more
30
\catcode
`
\/
\othercatcode
% probably not needed any more
31
\catcode
`
\'
\othercatcode
% probably not needed any more
32
\catcode
\tildeasciicode
\othercatcode
% probably not needed any more
33
\catcode
\hashasciicode
\othercatcode
% probably not needed any more
34
\catcode
\backslashasciicode
\othercatcode
% probably not needed any more
35
\stopcatcodetable
36 37
\startcatcodetable
\xmlcatcodese
38
\catcode
\tabasciicode
\spacecatcode
39
\catcode
\endoflineasciicode
\endoflinecatcode
40
\catcode
\formfeedasciicode
\endoflinecatcode
41
\catcode
\spaceasciicode
\spacecatcode
42
\catcode
\endoffileasciicode
\ignorecatcode
43
\catcode
\ampersandasciicode
\activecatcode
44
\catcode
`
\<
\activecatcode
45
\catcode
`
\>
\activecatcode
46
\catcode
\hashasciicode
\activecatcode
47
\catcode
\dollarasciicode
\activecatcode
48
\catcode
\commentasciicode
\activecatcode
49
\catcode
\backslashasciicode
\activecatcode
50
\catcode
\circumflexasciicode\activecatcode
51
\catcode
\underscoreasciicode\activecatcode
52
\catcode
\leftbraceasciicode
\activecatcode
53
\catcode
\rightbraceasciicode\activecatcode
54
\catcode
\barasciicode
\activecatcode
55
\catcode
\tildeasciicode
\activecatcode
56
\stopcatcodetable
57 58
\startcatcodetable
\xmlcatcodesr
59
\catcode
\tabasciicode
\spacecatcode
60
\catcode
\endoflineasciicode
\endoflinecatcode
61
\catcode
\formfeedasciicode
\endoflinecatcode
62
\catcode
\spaceasciicode
\spacecatcode
63
\catcode
\endoffileasciicode
\ignorecatcode
64
\catcode
\ampersandasciicode
\activecatcode
65
\catcode
`
\<
\activecatcode
66
\catcode
`
\>
\activecatcode
67
\catcode
\hashasciicode
\activecatcode
68
\catcode
\dollarasciicode
\activecatcode
69
\catcode
\commentasciicode
\activecatcode
70
\catcode
\backslashasciicode
\activecatcode
71
\catcode
\circumflexasciicode\activecatcode
72
\catcode
\underscoreasciicode\activecatcode
73
\catcode
\leftbraceasciicode
\activecatcode
74
\catcode
\rightbraceasciicode\activecatcode
75
\catcode
\barasciicode
\activecatcode
76
\catcode
\tildeasciicode
\activecatcode
77
\stopcatcodetable
78 79
%D Next we hook in some active character definitions.
80 81
\letcatcodecommand
\xmlcatcodesn
\ampersandasciicode
\relax
82
\letcatcodecommand
\xmlcatcodesn
`
\<
\relax
83 84
\letcatcodecommand
\xmlcatcodese
\ampersandasciicode
\relax
85
\letcatcodecommand
\xmlcatcodese
`
\<
\relax
86 87
\letcatcodecommand
\xmlcatcodesr
\ampersandasciicode
\relax
88
\letcatcodecommand
\xmlcatcodesr
`
\<
\relax
89 90
\letcatcodecommand
\xmlcatcodese
\hashasciicode
\relax
91
\letcatcodecommand
\xmlcatcodese
\dollarasciicode
\relax
92
\letcatcodecommand
\xmlcatcodese
\commentasciicode
\relax
93
\letcatcodecommand
\xmlcatcodese
\backslashasciicode
\relax
94
\letcatcodecommand
\xmlcatcodese
\circumflexasciicode
\relax
95
\letcatcodecommand
\xmlcatcodese
\underscoreasciicode
\relax
96
\letcatcodecommand
\xmlcatcodese
\leftbraceasciicode
\relax
97
\letcatcodecommand
\xmlcatcodese
\rightbraceasciicode
\relax
98
\letcatcodecommand
\xmlcatcodese
\barasciicode
\relax
99
\letcatcodecommand
\xmlcatcodese
\tildeasciicode
\relax
100 101
\letcatcodecommand
\xmlcatcodesr
\hashasciicode
\relax
102
\letcatcodecommand
\xmlcatcodesr
\dollarasciicode
\relax
103
\letcatcodecommand
\xmlcatcodesr
\commentasciicode
\relax
104
\letcatcodecommand
\xmlcatcodesr
\backslashasciicode
\relax
105
\letcatcodecommand
\xmlcatcodesr
\circumflexasciicode
\relax
106
\letcatcodecommand
\xmlcatcodesr
\underscoreasciicode
\relax
107
\letcatcodecommand
\xmlcatcodesr
\leftbraceasciicode
\relax
108
\letcatcodecommand
\xmlcatcodesr
\rightbraceasciicode
\relax
109
\letcatcodecommand
\xmlcatcodesr
\barasciicode
\relax
110
\letcatcodecommand
\xmlcatcodesr
\tildeasciicode
\relax
111 112
\let
\xmlcatcodes
\xmlcatcodesn
% beware, in mkiv we use \notcatcodes
113 114
%D We register the catcodetables at the \LUA\ end where some further
115
%D initializations take place.
116 117
\ctxcommand{
definecatcodetable
(
118
{
\number
\xmlcatcodesn
,
\number
\xmlcatcodese
,
\number
\xmlcatcodesr
}
,
% letter catcodes
119
{
\number
\xmlcatcodesn
,
\number
\xmlcatcodese
,
\number
\xmlcatcodesr
}
% activate catcodes
120
)
}
121 122
\ctxcommand{
registercatcodetable
(
"
xmlcatcodes
"
,
\number
\xmlcatcodes
)
}
123 124
\endinput
125