1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Typesetting Macros Italics Corrections}
15
16\unprotect
17
18
19
20
21
22
23
24
25\registerctxluafile{typoitc}{autosuffix}
26
27\installcorenamespace{italics}
28
29\permanent\protected\def\typo_italic_set
30 {\bitwiseflip\glyphoptions \textcheckitalicglyphoptioncode
31 \bitwiseflip\discretionaryoptions\textcheckitalicdiscoptioncode}
32
33\permanent\protected\def\typo_italic_reset
34 {\bitwiseflip\glyphoptions \textcheckitalicglyphoptioncode
35 \bitwiseflip\discretionaryoptions\textcheckitalicdiscoptioncode}
36
37\letcsname\??italics\v!no \endcsname\typo_italic_reset
38\letcsname\??italics\v!reset \endcsname\typo_italic_reset
39
40
41
42
43
44\permanent\tolerant\protected\def\setitaliccorrection[#1]
45 {\ifcsname\??italics#1\endcsname\lastnamedcs\else\typo_italic_set\fi}
46
47\aliased\let\resetitaliccorrection\typo_italic_reset
48\aliased\let\setupitaliccorrection\setitaliccorrection
49
50\permanent\protected\def\italiccorrection
51 {\ifbitwiseand\glyphoptions\textcheckitalicglyphoptioncode\else
52
53
54
55 \forcedrightcorrection
56 \fi}
57
58\pushoverloadmode
59 \aliased\let\/\italiccorrection
60
61\popoverloadmode
62
63
64
65\permanent\protected\def\pushitaliccorrection{}
66\permanent\protected\def\popitaliccorrection {}
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83\installcorenamespace{shapecorrection}
84
85\defcsname\??shapecorrection\v!left \endcsname{\groupedcommandcs\forcedleftcorrection\relax}
86\defcsname\??shapecorrection\v!right\endcsname{\groupedcommandcs\relax \forcedrightcorrection}
87\defcsname\??shapecorrection\v!both \endcsname{\groupedcommandcs\forcedleftcorrection\forcedrightcorrection}
88\defcsname\??shapecorrection \endcsname{\groupedcommandcs\relax \forcedrightcorrection}
89
90\permanent\tolerant\protected\def\shapecorrection[#1]{\begincsname\??shapecorrection#1\endcsname}
91
92\protect \endinput
93 |