1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Typesetting Macros Spacing}
15
16\unprotect
17
18\registerctxluafile{typospa}{}
19
20\definesystemattribute[spacing][public]
21
22
23
24
25
26
27
28\installcorenamespace{characterspacing}
29
30\installsetuponlycommandhandler \??characterspacing {pcharacterspacing}
31
32\setup_p_characterspacing
33 [\c!left=0,
34 \c!right=0,
35 \c!alternative=0]
36
37\unexpanded\def\definecharacterspacing[#1]
38 {\clf_definecharacterspacing{#1}}
39
40\unexpanded\def\setupcharacterspacing
41 {\dotripleargument\typo_characterspacing_setup}
42
43\def\typo_characterspacing_setup[#1][#2][#3]
44 {\begingroup
45 \setupcurrent_p_characterspacing[#3]
46 \clf_setupcharacterspacing
47 {#1}
48 \numexpr#2\relax
49 {
50 left \direct_p_characterspacingparameter\c!left\space
51 right \direct_p_characterspacingparameter\c!right\space
52 alternative \direct_p_characterspacingparameter\c!alternative
53 }
54 \relax
55 \endgroup}
56
57\unexpanded\def\setcharacterspacing[#1]
58 {\clf_setcharacterspacing{#1}}
59
60\unexpanded\def\resetcharacterspacing
61 {\c_attr_spacing\attributeunsetvalue}
62
63\appendtoks
64 \resetcharacterspacing
65\to \everyresettypesetting
66
67
68
69
70
71
72\definecharacterspacing [frenchpunctuation]
73
74\setupcharacterspacing [frenchpunctuation] ["003A] [\c!left =.25,\c!alternative=1]
75\setupcharacterspacing [frenchpunctuation] ["003B] [\c!left =.25,\c!alternative=1]
76\setupcharacterspacing [frenchpunctuation] ["003F] [\c!left =.25,\c!alternative=1]
77\setupcharacterspacing [frenchpunctuation] ["0021] [\c!left =.25,\c!alternative=1]
78\setupcharacterspacing [frenchpunctuation] ["00AB] [\c!right=.25,\c!alternative=1]
79\setupcharacterspacing [frenchpunctuation] ["00BB] [\c!left =.25,\c!alternative=1]
80
81\protect \endinput
82 |