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}{autosuffix}
19\registerctxluafile{charent}{}
20\registerctxluafile{charscr}{}
21
22
23\unprotect
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47\permanent\def\utfchar #1{\clf_utfchar {#1}}
48\permanent\def\safechar#1{\clf_safechar{#1}}
49
50\permanent\protected\def\Ux #1{\tocharacter{"#1}}
51\permanent \def\eUx#1{\tocharacter{"#1}}
52
53\permanent\def\expandUx{\enforced\let\Ux\eUx}
54
55\permanent \def\checkedchar {\relax\ifmmode\expandafter\checkedmathchar\else\expandafter\checkedtextchar\fi}
56\permanent \def\checkedmathchar#1#2{#2}
57\permanent\protected\def\checkedtextchar #1{\clf_doifelsecharinfont{#1}{\char#1}}
58
59\newconditional\prefermathovertextchar
60
61\permanent\protected\def\textormathchar#1
62 {\begingroup
63 \scratchcounter#1\relax
64 \ifmmode
65 \char\scratchcounter
66 \else
67 \ifconditional\prefermathovertextchar
68
69 \setfontid\fontid\textfont\c_font_fam_mr
70 \fi
71 \iffontchar\font\scratchcounter
72 \char\scratchcounter
73 \else
74 \normalstartimath\char\scratchcounter\normalstopimath
75 \fi
76 \fi
77 \endgroup}
78
79\permanent\protected\def\textormathchars#1
80 {{\font_text_or_mathchars#1\relax}}
81
82\protected\def\font_text_or_mathchars#1#2\relax
83 {\relax\ifmmode
84 #1#2
85 \orelse\iffontchar\font#1\relax
86 #1#2\relax
87 \else
88 \normalstartimath#1#2\normalstopimath
89 \fi}
90
91
92
93
94
95
96
97
98
99\clf_setlettercatcodes\texcatcodes
100\clf_setlettercatcodes\ctxcatcodes
101\clf_setlettercatcodes\notcatcodes
102
103\clf_setlettercatcodes\vrbcatcodes
104\clf_setlettercatcodes\prtcatcodes
105\clf_setlettercatcodes\tpacatcodes
106\clf_setlettercatcodes\tpbcatcodes
107\clf_setlettercatcodes\txtcatcodes
108
109\clf_setothercatcodes \rlncatcodes
110
111\clf_setactivecatcodes\ctxcatcodes
112\clf_setactivecatcodes\notcatcodes
113\clf_setactivecatcodes\prtcatcodes
114
115\clf_setcharacternames\ctxcatcodes
116
117\permanent\def\chardescription#1{\clf_chardescription#1\relax}
118
119
120
121
122
123
124
125\permanent\protected\def\overloaduppercase{\clf_overloaduppercase}
126\permanent\protected\def\overloadlowercase{\clf_overloadlowercase}
127
128
129
130\permanent\protected\def\addcharacternames{\ctxlua{characters.addcharacternames()}}
131
132
133
134\protect \endinput
135 |