1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Character Support Initialization}
15
16\registerctxluafile{charfio}{}
17\registerctxluafile{charmap}{}
18\registerctxluafile{chartex}{}
19\registerctxluafile{charent}{}
20\registerctxluafile{charscr}{}
21
22\unprotect
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46\def\utfchar #1{\clf_utfchar {#1}}
47\def\safechar#1{\clf_safechar{#1}}
48
49\unexpanded\def\Ux #1{\Uchar\numexpr"#1\relax}
50 \def\eUx#1{\Uchar\numexpr"#1\relax}
51
52\unexpanded\def\expandUx{\let\Ux\eUx}
53
54\def\checkedchar {\relax\ifmmode\expandafter\checkedmathchar\else\expandafter\checkedtextchar\fi}
55\def\checkedmathchar#1#2{#2}
56
57
58\unexpanded\def\checkedtextchar#1
59 {\clf_doifelsecharinfont\numexpr#1\relax{\char#1}}
60
61
62
63
64
65
66
67
68
69
70\newconditional\prefermathovertextchar
71
72\unexpanded\def\textormathchar#1
73 {\begingroup
74 \scratchcounter#1\relax
75 \ifmmode
76 \char\scratchcounter
77 \else
78 \ifconditional\prefermathovertextchar
79
80 \setfontid\fontid\textfont\c_font_fam_mr
81 \fi
82 \iffontchar\font\scratchcounter
83 \char\scratchcounter
84 \else
85 \normalstartimath\char\scratchcounter\normalstopimath
86 \fi
87 \fi
88 \endgroup}
89
90\unexpanded\def\textormathchars#1
91 {{\font_text_or_mathchars#1\relax}}
92
93\unexpanded\def\font_text_or_mathchars#1#2\relax
94 {\relax\ifmmode
95 #1#2
96 \else\iffontchar\font#1\relax
97 #1#2\relax
98 \else
99 \normalstartimath#1#2\normalstopimath
100 \fi\fi}
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115\clf_setlettercatcodes\texcatcodes
116\clf_setlettercatcodes\ctxcatcodes
117\clf_setlettercatcodes\notcatcodes
118
119\clf_setlettercatcodes\vrbcatcodes
120\clf_setlettercatcodes\prtcatcodes
121\clf_setlettercatcodes\tpacatcodes
122\clf_setlettercatcodes\tpbcatcodes
123\clf_setlettercatcodes\txtcatcodes
124
125\clf_setactivecatcodes\ctxcatcodes
126\clf_setactivecatcodes\notcatcodes
127\clf_setactivecatcodes\prtcatcodes
128
129\clf_setcharacternames\ctxcatcodes
130
131\def\chardescription#1{\clf_chardescription#1\relax}
132
133
134
135
136
137
138
139\unexpanded\def\overloaduppercase{\clf_overloaduppercase}
140\unexpanded\def\overloadlowercase{\clf_overloadlowercase}
141
142\protect \endinput
143 |