1
2
3\usemodule[presentboring,abbreviationslogos]
4
5\definecolor[maincolor] [r=.4,g=.4]
6\definecolor[extracolor][s=.1]
7
8\startdocument
9 [title={PARAGRAPHS},
10 banner={a bit of an upgrade},
11 location={context\enspace {\bf 2021}\enspace meeting}]
12
13\starttitle[title=Note]
14
15\startitemize
16
17\startitem
18 Some of the following already is present for a while and has been discussed
19 at previous meetings.
20\stopitem
21
22\startitem
23 But \unknown\ occasionally some minor tweak gets added so consider this to be
24 an update.
25\stopitem
26
27\stopitemize
28
29\starttitle[title=Spacing]
30
31\startitemize
32
33\startitem
34 Spaces in \TEX\ become glue nodes (with optional stretch and shrink).
35\stopitem
36
37\startitem
38 In traditional \TEX\ these glue nodes are ref counted copies of the current
39 spacing related variables.
40\stopitem
41
42\startitem
43 In \LUATEX\ we make real copies so that when we mess with the node list
44 changes to glue dont affect other instances.
45\stopitem
46
47\stopitemize
48
49\starttitle[title=Parameters]
50
51\startitemize
52
53\startitem
54 In traditional \TEX\ the paragraphs bound properties that are in effect
55 when \type {\par} happens are used when breaking into lines.
56\stopitem
57
58\startitem
59 In \LUAMETATEX\ the paragraphs bound properties are stored with the
60 paragraph and can be frozen when they are set.
61\stopitem
62
63\startitem
64 This gives a more predictable (and robust) way of manipulating a
65 paragraph.
66\stopitem
67
68\startitem
69 We can for instance get rid of grouping side effects that interfere with
70 \type {\everypar}.
71\stopitem
72
73\startitem
74 Currently three dozen parameters are tracked but they are grouped in
75 categories.
76\stopitem
77
78\blank[2*big] {\em (show code and examples)}
79
80\stopitemize
81
82\stoptitle
83
84\starttitle[title=Wrapping]
85
86\startitemize
87
88\startitem
89 Doing something in front of a paragraph is taken care of by good old
90 \type {\everypar}.
91\stopitem
92
93\startitem
94 In \LUAMETATEX\ we also have \type {\everybeforepar} but so far in \CONTEXT\
95 we havent used that.
96\stopitem
97
98\startitem
99 Adding something to the end of a paragraph can be tricky so we have
100 a wrapper mechanism: \type {\wrapuppar}.
101\stopitem
102
103\startitem
104 The \type {\wrapuppar} primitive is similar to \type {\atendofgroup} in the
105 sense that it accumulates tokens (so no \type {\endofpar}).
106\stopitem
107
108\startitem
109 Normally these primitives are not used directly but managed by a more general
110 system of handling paragraphs.
111\stopitem
112
113\stopitemize
114
115\blank[2*big] {\em (show code and examples)}
116
117\stoptitle
118
119\starttitle[title=Normalizing]
120
121\startitemize
122
123\startitem
124 In order to see consistent paragraphs at the \LUA\ end in \LUAMETATEX\
125 we can normalize the lines that come from the paragraph builder.
126\stopitem
127
128\startitem
129 Normalization results in:
130
131 \startitemize
132 \startitem
133 the first line having: indent skip
134 \stopitem
135 \startitem
136 each line having: left hang, left skip, right skip, right hang
137 \stopitem
138 \startitem
139 the last line having: left parfill skip, right parfill skip
140 \stopitem
141 \stopitemize
142\stopitem
143
144\startitem
145 It is controlled by \type {\normalizelinemode} which has additional flags for
146 swapping hanging indentation and par shapes, breaking after dir nodes,
147 removing margin kerns and clipping the line width.
148\stopitem
149
150\startitem
151 The clipping options avoids the side effects of \TEX\ using shifts which has
152 the side effect of unreal dimensions. This is one of the tricksproperties
153 of the traditional engine that is perfectly fine until we open up things.
154\stopitem
155
156\stopitemize
157
158\blank[2*big] {\em (show code and examples)}
159
160\stoptitle
161
162\stopdocument
163 |