1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Typesetting Macros First Lines}
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51\unprotect
52
53\registerctxluafile{typofln}{}
54
55\definesystemattribute[firstline][public]
56
57\appendtoks
58 \c_attr_firstline\attributeunsetvalue
59\to \everyforgetall
60
61\installcorenamespace {firstline}
62
63\installcommandhandler \??firstline {firstline} \??firstline
64
65\setupfirstline
66 [\c!alternative=\v!line,
67
68
69 \c!n=1]
70
71\unexpanded\def\setfirstline
72 {\dosingleempty\typo_firstline_set}
73
74\unexpanded\def\typo_firstline_set[#1]
75 {\edef\typo_firstline_handle{\typo_firstline_handle_indeed{#1}}}
76
77\unexpanded\def\typo_firstline_handle_indeed#1
78 {\dontleavehmode
79 \begingroup
80 \edef\currentfirstline{#1}
81 \usefirstlinestyleandcolor\c!style\c!color
82 \clf_setfirstline
83 alternative {\firstlineparameter\c!alternative}
84 ma \c_attr_colormodel
85 ca \c_attr_color
86 ta \c_attr_transparency
87 n \numexpr\firstlineparameter\c!n\relax
88 font \fontid\font
89 dynamic \font_dynamic_value
90 \relax
91
92
93 \endgroup
94 \glet\typo_firstline_handle\relax}
95
96\let\typo_firstline_handle\relax
97
98
99
100
101
102
103
104\unexpanded\def\applytofirstcharacter#1
105 {\begingroup
106 \dowithnextbox
107 {\clf_applytofirstcharacter\nextbox{\csstring#1}
108 \unhbox\nextbox
109 \endgroup}
110 \hbox}
111
112\protect \endinput
113 |