1
2
3
4\environment lowlevelstyle
5
6\usemodule[systemtokens]
7
8\definefontfeature[default][default][expansion=quality]
9
10\appendtoks\showmakeup[reset]\to\everybeforeoutput
11
12\usebodyfont[dejavu]
13\usebodyfont[pagella]
14
15\startdocument
16 [title=debugging,
17 color=darkgray]
18
19\startsectionlevel[title=Introduction]
20
21Below there will be some examples of how you can see what \TEX\ is doing. We
22start with some verbose logging but then move on to the more visual features. We
23occasionally point to some features present in the \LUAMETATEX\ engine. More
24details about what is possible can be found in documents in the \CONTEXT\
25distribution, for instance the \quote {lowlevel} manuals.
26
27Typesetting involves par building, page building, inserts (footnotes, floats),
28vertical adjusters (stuff before and after the current line), marks (used for
29running headers and footers), alignments (to build tables), math, local boxes
30(left and right of lines), hyphenation, font handling, and more and each has its
31own specific ways of tracing, either provided by the engine, or by \CONTEXT\
32itself. You can run \typ {context trackers} to get a list of what \CONTEXT\ can
33do, as it lists most of them. But we start with the language, where tokens play
34an important role.
35
36\stopsectionlevel
37
38\startsectionlevel[title=Token lists]
39
40There are two main types of linked lists in \TEX: token lists and node lists.
41Token lists relate to the language and node lists collect (to be) typeset content
42and are used for several stack based structures. Both are efficiently memory
43managed by the engine. Token lists have only forward links, but node lists link
44in both directions, at least in \LUATEX\ and \LUAMETATEX.
45
46When you define a macro, like the following, you get a token list:
47
48\startbuffer
49\def\test#1{\bgroup\bf#1\egroup}
50\stopbuffer
51
52\typebuffer \getbuffer
53
54Internally the \type {\test} macro has carry the argument part and the body,
55and each is encoded as a number plus a pointer to the next token.
56
57\luatokentable\test
58
59Here the first (large) number is a memory location that holds two 4 byte integers
60per token: the so called info part codes the command and sub command, the two
61smaller numbers in the table, and a link part that points to the next memory
62location, here the nest row. The last columns provide details. A character like
63\quote {a} is one token, but a control sequence like \type {\foo} is also one
64token because every control sequence gets a number. So, both take eight bytes of
65memory which is why a format file can become large and memory consumption grows
66the more macros you use.
67
68In the body of the above \type {\test} macro we used \type {\bf} so lets see how
69that looks:
70
71\luatokentable\bf
72
73Here the numbers are much lower which is an indication that they are likely in
74the format. They are also ordered, which is a side effect of \LUAMETATEX\ making
75sure that the token lists stored in the format file keep their tokens close
76together in memory which could potentially be a bit faster. But, when we are in a
77production run, the tokens come from the pool of freed or additionally allocated
78tokens:
79
80\start
81
82\startbuffer
83\tolerant\permanent\protected\def\test[#1]#:#2
84 {{\iftok{#1}{sl}\bs\else\bf\fi#2}}
85\stopbuffer
86
87\typebuffer \getbuffer
88
89Gives us:
90
91\luatokentable\test
92
93\stop
94
95If you are familiar with \TEX\ and spend some time looking at this you will start
96recognizing entries. For instance \type {11 115} translates to \type {letter s}
97because \type {11} is the so called command code of letters (also its \type
98{\catcode}) and the \type {s} has \UTF8 value \type {115}. The \LUAMETATEX\
99specific \type {\iftok} conditional has command code \type {135} and sub code
100\type {29}. Internally these are called \type {cmd} and \type {chr} codes because
101in many cases its characters that are the sub commands.
102
103There is more to tell about these commands and the way macros are defined, for
104instance \type {tolerant} here means that we can omit the the first argument
105(between brackets) in which case we pick up after the \type {#:}. With \type
106{protected} we indicate that the macro will not expand in for instance an \type
107{\edef} and \type {permanent} marks the macro as one that a user cannot redefine
108(assuming that overload protection is enabled). The extended macro argument
109parsing features and macro overload protection are something specific to
110\LUAMETATEX.
111
112These introspective tables can be generated with:
113
114\starttyping
115\luatokentable\test
116\stoptyping
117
118after loading the module \type {systemtokens}. The reason for having a module
119and not a builtin tracer is that users seldom want to do this. Instead they
120might use \typ {\showluatokens \test} that just reports something similar to the
121console andor log file.
122
123There is much more to tell but most users have no need to look into these
124details unless they are curious about what \TEX\ does. In that case using \type
125{tracingall} and inspecting the log file can be revealing too, but be prepared
126for huge files. In \LUAMETATEX\ we have tried to improve these traces a bit but
127thats of course subjective and even then logs can become huge. But even if one
128doesnt understand all that is shown, it gives an impression about how much work
129\TEX\ is actually doing.
130
131\stopsectionlevel
132
133\startsectionlevel[title=Node lists]
134
135A node list is what you get from input that is (to be) typeset. There are several
136ways to see what node lists are produced but these are all very verbose. Take for
137instance:
138
139\startbuffer
140\setbox\scratchbox\hbox{test \bf test}
141
142\showboxhere\scratchbox
143\stopbuffer
144
145\typebuffer
146
147This gives us:
148
149\starttyping[style=small,align=hangright]
150\hlist[box][color=1,colormodel=1,mathintervals=1], width 47.8457pt, height 7.48193pt, depth 0.15576pt, direction l2r, state 1
151.\list
152..\glyph[unset][color=1,colormodel=1], protected, wd 4.42041pt, ht 7.48193pt, dp 0.15576pt, language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <1: DejaVuSerif @ 11.0pt>, glyph U0074
153..\glyph[unset][color=1,colormodel=1], protected, wd 6.50977pt, ht 5.86523pt, dp 0.15576pt, language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <1: DejaVuSerif @ 11.0pt>, glyph U0065
154..\glyph[unset][color=1,colormodel=1], protected, wd 5.64502pt, ht 5.86523pt, dp 0.15576pt, language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <1: DejaVuSerif @ 11.0pt>, glyph U0073
155..\glyph[unset][color=1,colormodel=1], protected, wd 4.42041pt, ht 7.48193pt, dp 0.15576pt, language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <1: DejaVuSerif @ 11.0pt>, glyph U0074
156..\glue[spaceskip][color=1,colormodel=1] 3.49658pt plus 1.74829pt minus 1.16553pt, font 1
157..\glyph[unset][color=1,colormodel=1], protected, wd 5.08105pt, ht 7.48193pt, dp 0.15576pt, language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <10: DejaVuSerifBold @ 11.0pt>, glyph U0074
158..\glyph[unset][color=1,colormodel=1], protected, wd 6.99854pt, ht 5.86523pt, dp 0.15576pt, language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <10: DejaVuSerifBold @ 11.0pt>, glyph U0065
159..\glyph[unset][color=1,colormodel=1], protected, wd 6.19287pt, ht 5.86523pt, dp 0.15576pt, language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <10: DejaVuSerifBold @ 11.0pt>, glyph U0073
160..\glyph[unset][color=1,colormodel=1], protected, wd 5.08105pt, ht 7.48193pt, dp 0.15576pt, language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <10: DejaVuSerifBold @ 11.0pt>, glyph U0074
161\stoptyping
162
163The periods indicate the nesting level and the slash in front of the initial
164field is mostly a historic curiosity because there are no \type {\hlist} and
165\type {\glue} primitives, but actually there is in \LUAMETATEX\ a \type {\glyph}
166primitive but that one definitely doesnt want the shown arguments.
167
168That said, here we have a horizontal list where the list field points to a glyph
169that itself points to a next one. The space became a glue node. In \LUATEX\ and
170even more in \LUAMETATEX\ all nodes have or get a subtype assigned that indicates
171what were dealing with. This is shown between the first pair of brackets. Then
172there are attributes, between the second pair of brackets, which actually is a
173also a (sparse) linked list. Here we have two attributes set, the color, where
174the number points to some stored color specification, and the (here somewhat
175redundant) color space. The names of these attributes are macro package dependent
176because attributes are just a combination of a number and value. The engine
177itself doesnt do anything with them; it is the \LUA\ code you plug in that can
178do something useful based on the values.
179
180It will be clear that watching a complete page, with many nested boxes, rules,
181glyphs, discretionaries, glues, kerns, penalties, boundaries etc quickly becomes
182a challenge which is why we have other means to see what we get so lets move on
183to that now.
184
185\stopsectionlevel
186
187\startsectionlevel[title=Visual debugging]
188
189In the early days of \CONTEXT, in the mid 90s of the previous century, one of
190the first presentations at an \NTG\ meeting was about visual debugging. This
191feature was achieved by overloading the primitives that make boxes, add glue,
192inject penalties and kerns, etc. It actually worked quite well, although in some
193cases, for instance where boxes have to be unboxed, one has to disable it. I
194remember some puzzlement among the audience about the fact that indeed these
195primitives could be overloaded without too many side effects. It will be no
196surprise that this feature has been carried on to later versions, and in
197\CONTEXT\ \MKIV\ it was implemented in a different (less intrusive) way and it
198got gradually extended.
199
200\startbuffer
201\showmakeup \hbox{test \bf test}
202\stopbuffer
203
204\typebuffer
205
206This gives us a framed horizontal box, with some text and a space glue:
207
208\startlinecorrection
209\scale[height=1cm]{\start \inlinebuffer \stop}
210\stoplinecorrection
211
212Of course not all information is well visible simply because it can be overlayed
213by what follows, but one gets the idea. Also, when you have a layer capable \PDF\
214viewer you can turn on and off categories, so you can decide to only show glue.
215You can also do that immediately, with \typ {\showmakeup [glue]}.
216
217There is a lot of granularity: \typ {hbox}, \typ {vbox}, \typ {vtop}, \typ
218{kern}, \typ {glue}, \typ {penalty}, \typ {fontkern}, \typ {strut}, \typ
219{whatsit}, \typ {glyph}, \typ {simple}, \typ {simplehbox}, \typ {simplevbox},
220\typ {simplevtop}, \typ {user}, \typ {math}, \typ {italic}, \typ {origin}, \typ
221{discretionary}, \typ {expansion}, \typ {line}, \typ {space}, \typ {depth}, \typ
222{marginkern}, \typ {mathkern}, \typ {dir}, \typ {par}, \typ {mathglue}, \typ
223{mark}, \typ {insert}, \typ {boundary}, the more selective \typ {vkern}, \typ
224{hkern}, \typ {vglue}, \typ {hglue}, \typ {vpenalty} and \typ {hpenalty}, as well
225as some presets like \typ {boxes}, \typ {makeup} and \typ {all}.
226
227When we have:
228
229\startbuffer
230\showmakeup \framed[align=normal]{\samplefile{ward}}
231\stopbuffer
232
233\typebuffer
234
235we get:
236
237\startlinecorrection
238\scale[width=1tw]{\start \inlinebuffer \stop}
239\stoplinecorrection
240
241And that is why exploring this with a layers enabled \PDF\ viewer can be of help.
242Alternatively a more selective use of \typ {\showmakup} makes sense, like
243
244\startbuffer
245\showmakeup[line,space] \framed[align=normal]{\samplefile{ward}}
246\stopbuffer
247
248\typebuffer
249
250Here we only see lines, regular spaces and spaces that are determined by the
251space factor that is driven by punctuation.
252
253\startlinecorrection
254\scale[width=1tw]{\start \inlinebuffer \stop}
255\stoplinecorrection
256
257\startbuffer[demo]
258\leftskip 2cm
259\rightskip 3cm
260\hangindent 1cm
261\hangafter 2
262\parfillrightskip 1cm
263\parfillleftskip 1cm
264\parinitrightskip 1cm
265\parinitleftskip 1cm
266\parindent 2cm
267\stopbuffer
268
269\startbuffer
270\showmakeup \framed[align=normal]{\getbuffer[demo]\samplefile{ward}}
271\stopbuffer
272
273We can typeset the previous example with these settings:
274
275\typebuffer[demo]
276
277This time we get:
278
279\startlinecorrection
280\scale[width=1tw]{\start \inlinebuffer \stop}
281\stoplinecorrection
282
283Looking at this kind of output only makes sense on screen where you can zoom in
284but what we want to demonstrate here is that in \LUAMETATEX\ we have not only a
285bit more control over the paragraph (indicated by comments) but also that we
286always have the related glue present. The reason is that we then have a more
287predictable packaged line when we look at one from the \LUA\ end. Where \TEX\
288normally moves the final line content left or right via either glue or the shifts
289property of a box, here we always use the glue. We call this normalization. Keep
290in mind that \TEX\ was not designed (implemented) with exposing its internals in
291mind, but for \LUATEX\ and \LUAMETATEX\ we have to take care of that.
292
293Another characteristic is that the paragraph stores these (and many more)
294properties in the so called initial par node so that they work well in situations
295where grouping would interfere with our objectives. As with all extensions, these
296are things that can be configured in detail but they are enabled in \CONTEXT\ by
297default.
298
299\stopsectionlevel
300
301\startsectionlevel[title=Math]
302
303Math is a good example where this kind of tracing helps development. Here is an
304example:
305
306\startbuffer
307\im { \showmakeup y = \sqrt {2x 4} }
308\stopbuffer
309
310\typebuffer
311
312Scaled up we get:
313
314\blank[2*big]
315
316\startlinecorrection
317\scale[height=2cm]{\inlinebuffer}
318\stoplinecorrection
319
320\blank[2*big]
321
322Instead of showing everything we can again be more selective:
323
324\startbuffer
325\im {
326 \showmakeup[mathglue,glyph]
327 y = \sqrt {2x 4}
328}
329\stopbuffer
330
331\typebuffer
332
333Here we not only limit ourselves to math glue, but also enable showing the
334bounding boxes of glyphs.
335
336\startlinecorrection
337\scale[height=2cm]{\inlinebuffer}
338\stoplinecorrection
339
340This example also shows that in \LUAMETATEX\ we have more classes than in a
341traditional \TEX\ engine. For instance, radicals have their own class as do
342digits. The radical class is an engine one, the digit class is a user defined
343class. You can set up the spacing between each class depending on the style. For
344the record: this is just one of the many extensions to the math engine and when
345extensions are being developed it helps to have this kind of tracing. Take for
346instance the next example, where we have multiple indexes (indicated by \type
347{}) on a nucleus, that get separated by a little so called continuation
348spacing.
349
350\startbuffer
351\im {
352 \showmakeup[mathglue,glyph]
353 y = \sqrt {x1a {\darkred } x1b}
354}
355\stopbuffer
356
357\typebuffer
358
359\startlinecorrection
360\scale[height=2cm]{\inlinebuffer}
361\stoplinecorrection
362
363Here the variable class is used for alphabetic characters and some more, contrary
364to the more traditional (often engine assigned) ordinary class that is now used
365for the leftovers.
366
367\stopsectionlevel
368
369\startsectionlevel[title=Fonts]
370
371Some of the mentioned tracing has shortcuts, for instance \typ {\showglyphs}.
372Here we show the same sample paragraph as before:
373
374\startbuffer
375\showglyphs
376\showfontkerns
377\framed[align=normal]{\samplefile{ward}}
378\stopbuffer
379
380\typebuffer
381
382Here is the upper left corner of the result:
383
384\startlinecorrection
385\clip[nx=4,n=1,ny=4,y=1]{\scale[width=4tw]{\start\inlinebuffer \stop}}
386\stoplinecorrection
387
388What font kerns we get depends on the font, here we use pagella:
389
390\startlinecorrection
391\switchtobodyfont[pagella]
392\scale[width=1tw]{\start\inlinebuffer \stop}
393\stoplinecorrection
394
395If we zoom in the kerns are more visible:
396
397\startlinecorrection
398\switchtobodyfont[pagella]
399\clip[nx=3,n=1]{\scale[width=3tw]{\start\inlinebuffer \stop}}
400\stoplinecorrection
401
402And here is another one:
403
404\startbuffer
405\showfontexpansion
406\framed[align={normal,hz}]{\samplefile{ward}}
407\stopbuffer
408
409\typebuffer
410
411\startlinecorrection
412\switchtobodyfont[pagella]
413\scale[width=1tw]{\start\inlinebuffer \stop}
414\stoplinecorrection
415
416or blown up:
417
418\startlinecorrection
419\switchtobodyfont[pagella]
420\clip[nx=3,n=1]{\scale[width=3tw]{\start\inlinebuffer \stop}}
421\stoplinecorrection
422
423The last line (normally) doesnt need expansion, unless we want it to compatible
424with preceding lines, spacewise. So when we do this:
425
426\startbuffer
427\showfontexpansion
428\framed[align={normal,hz,fit}]{\samplefile{ward}}
429\stopbuffer
430
431\typebuffer
432
433the \type {fit} directives results in somewhat different results:
434
435\startlinecorrection
436\switchtobodyfont[pagella]
437\clip[nx=3,n=1]{\scale[width=3tw]{\start\inlinebuffer \stop}}
438\stoplinecorrection
439
440As with other visual tracers you can get some insight in how \TEX\ turns your input into
441a typeset result.
442
443\stopsectionlevel
444
445\startsectionlevel[title=Overflow]
446
447By default the engine is a bit stressed to make paragraphs fit well. This means that we can
448get overflowing lines. Because there is a threshold only visible overflow is reported. If you
449want a visual clue, you can do this:
450
451\startbuffer
452\enabletrackers[builders.hpack.overflow]
453\stopbuffer
454
455\typebuffer
456
457With:
458
459\startbuffer
460\ruledvbox{\hsize 3cm test test test test test test test test}
461\stopbuffer
462
463\typebuffer
464
465We get:
466
467\startlinecorrection
468\enabletrackers[builders.hpack.overflow]
469\switchtobodyfont[dejavu,12pt]
470\getbuffer
471\disabletrackers[builders.hpack.overflow]
472\stoplinecorrection
473
474The red bar indicates a potential problem. We can also get an underflow, as demonstrated here:
475
476\startbuffer
477\ruledvbox {
478 \setupalign[verytolerant,stretch]
479 \hsize 3cm test test test test test test test test
480}
481\stopbuffer
482
483\typebuffer
484
485Now we get a blue bar that indicates that we have a bit more stretch than is
486considered optimal:
487
488\startlinecorrection
489\enabletrackers[builders.hpack.overflow]
490\switchtobodyfont[dejavu,12pt]
491\getbuffer
492\disabletrackers[builders.hpack.overflow]
493\stoplinecorrection
494
495Especially in automated flows it makes sense to increase the tolerance and permit
496stretch. Only when the strict attempt fails that will kick in.
497
498\stopsectionlevel
499
500\startsectionlevel[title=Side floats]
501
502Some mechanisms are way more complex than a user might expect from the result. An example is
503the placement of float and especially side floats.
504
505\enabletrackers[floats.anchoring]
506\startplacefigure[location=left]
507 \setupexternalfigures[location={global,default}]
508 \externalfigure[cow.pdf][width=3cm]
509\stopplacefigure
510\disabletrackers[floats.anchoring]
511
512Not only do we have to make sure that the spacing before such a float is as good
513and consistent as possible, we also need the progression to work out well, that
514is: the number of lines that we need to indent. \par For that we need to estimate
515the space needed, look at the amount of space before and after the float, check
516if it will fit and move to the next page if needed. That all involves dealing
517with interline spacing, interparagraph spacing, spacing at the top of a page,
518permitted slack at the bottom of page, the depth of the preceding lines, and so
519on. The tracer shows some of the corrections involved but leave it to the user to
520imagine what it relates to; the previous sentence gives some clues. This tracker is
521enables with:
522
523\starttyping
524\enabletrackers[floats.anchoring]
525\stoptyping
526
527\stopsectionlevel
528
529\startsectionlevel[title=Struts]
530
531We now come to one of the most important trackers, \typ {\showstruts}, and a few
532examples shows why:
533
534\startlinecorrection
535\startcombination[nx=4,ny=1,width=.2tw]
536 {\showstruts\framed[width=.2tw] {test}} {\type{width=.2tw}}
537 {\showstruts\framed[width=.2tw,height=1cm] {test}} {\type{height=1cm}}
538 {\showstruts\framed[width=.2tw,offset=0pt] {test}} {\type{offset=0pt}}
539 {\showstruts\framed[width=.2tw,offset=overlay]{test}} {\type{offset=overlay}}
540\stopcombination
541\stoplinecorrection
542
543Here in all cases weve set the width to 20 percent of the text width (\type {tw}
544is an example of a plugged in dimension). In many places \CONTEXT\ adds struts in
545order to enforce proper spacing so when spacing is not what you expect, enabling
546this tracker can help you figure out why.
547
548\stopsectionlevel
549
550\startsectionlevel[title=Features]
551
552Compared to the time when \TEX\ showed up the current fonts are more complicated,
553especially because features go beyond only ligaturing and kerning. But even
554ligaturing can be different, because some fonts use kerning and replacement
555instead of a new character. Pagella uses a multiple to single replacement:
556
557\blank \showotfcomposition
558 {file:texgyrepagellaregular.otf*default @ 12pt}
559 {0}
560 {\nl effe fietsen}
561
562Not all features listed here are provided by the font (only the four character
563ones) because were using \TEX\ which, it being \TEX, means that we have plenty
564more ways to mess around with additional features: its all about detailed
565control. But what you see here are the steps taken: the font handler loops over
566the list of glyphs and here we see the intermediate results when something has
567changed. There can be way more loops that in this simple case.
568
569With Cambria we get a single replacement combined with kerning:
570
571\blank \showotfcomposition
572 {file:cambria.ttc*default @ 12pt}
573 {0}
574 {\nl effe fietsen}
575
576One complication is that hyphenation kicks in which means that whatever we do has
577to take the pre, post and replacement bits into account combined which what comes
578before and after. Especially for complex scripts this tracker can be illustrative
579but even then only for those who like to see what fonts do andor when they add
580additional features runtime.
581
582\stopsectionlevel
583
584\startsectionlevel[title=Profiling]
585
586There are some features in \CONTEXT\ that are nice but only useful in some situations. An
587example is profiling. It is something you will not turn on by default, if only because of
588the overhead it brings. The next two paragraphs (using Pagella) show the effect.
589
590\startbuffer
591The command \tex {binom} is the standard notation for binomial coefficients and is
592preferred over \tex {choose}, which is an older macro that has limited
593compatibility with newer packages and font encodings: \im{A=\binom{N}{k}2}.
594Additionally, \tex {binom} uses proper spacing and size for the binomial symbol.
595In conclusion, it is recommended to use \tex {binom} instead of \tex {choose} in
596\TEX\ for typesetting binomial coefficients for better compatibility and uniform
597appearance.\par
598\stopbuffer
599
600\bgroup \hsize 130mm
601\switchtobodyfont[pagella,11pt]
602\showmakeup[line]
603\getbuffer
604\egroup
605
606The previous paragraph is what comes out by default, while the next one used
607these settings plus an additional \typ {\enabletrackers [profiling.lines.show]}.
608
609\startbuffer[demo]
610\setuplineprofile[factor=0.1,step=0.5\emwidth]
611\setupalign[profile]
612\stopbuffer
613
614\bgroup \hsize 130mm
615\switchtobodyfont[pagella,11pt]
616\showmakeup[line]
617\getbuffer[demo]
618\enabletrackers[profiling.lines.show]
619\getbuffer
620\disabletrackers[profiling.lines.show]
621\egroup
622
623This feature will bring lines together when there is no clash and is mostly of
624use when a lot of inline math is used. However, when this variant of profiling
625(we have an older one too) is enabled on a 300 page math book with thousands of
626formulas, only in a few places it demonstrated effect; it was hardly needed
627anyway. So, sometimes tracing shows what makes sense or not.
628
629\stopsectionlevel
630
631\startsectionlevel[title=Par builder]
632
633Here is is a sample paragraph from Knuths \quotation {Digital Typography}:
634
635\startshowbreakpoints
636 \samplefile{mathknuthdt}
637\stopshowbreakpoints
638
639There are indicators with tiny numbers that indicate the possible breakpoints and
640we can see what the verdict is:
641
642\showbreakpoints
643
644The last lines in the last column show the route that the result takes. Without
645going into details, here is what we did:
646
647\starttyping
648\startshowbreakpoints
649 \samplefile{mathknuthdt}
650\stopshowbreakpoints
651
652\showbreakpoints
653\stoptyping
654
655This kind of tracing is part of a mechanism that makes it possible to influence
656the choice by choosing a specific preferred breakpoint but that is something the
657average user is unlikely to do. The main reason why we have this kind of trackers
658is that when developing the new multistep par builder feature we wanted to see
659what exactly it did influence. That mechanism uses an \LUAMETATEX\ feature where
660we can plug in additional passes using the \type {\parpasses} primitive that can
661add different strategies that are tried until criteria for over and underfull
662thresholds andor badness are met. Each step can set the relevant parameters
663differently, including expansion, which actually makes for more efficient output
664and better runtime when that features is not needed to get better results.
665
666\stopsectionlevel
667
668\startsectionlevel[title=More]
669
670There are many more visual trackers, for instance \typ {layout.vz} for when you
671enabled vertical expansion, \typ {typesetters.suspects} for identifying possible
672issues in the input like invisible spaces. Trackers like \typ
673{nodes.destinations} and \typ {nodes.references} will show the areas used by
674these mechanisms. There are also trackers for positions, (cjk and other), script
675handling, rubies, tagging, italic correction, breakpoints and so on. The examples
676in the previous sections illustrate what to expect and when to use a specific
677mechanism knowing this might trigger you to check if a tracker exists. Often the
678test suite has examples of usage.
679
680\stopsectionlevel
681
682\stopdocument
683
684 |