lowlevel-marks.tex /size: 21 Kb    last modification: 2021-10-28 13:50
1% language=us runpath=texruns:manuals/lowlevel
2
3\environment lowlevel-style
4
5\startdocument
6  [title=marks,
7   color=middlemagenta]
8
9\startsectionlevel[title=Introduction]
10
11Marks are one of the subsystems of \TEX, as are for instance alignments and math
12as well as inserts which they share some properties with. Both inserts and marks
13put signals in the list that later on get intercepted and can be used to access
14stored information. In the case of inserts this is typeset materials, like
15footnotes, and in the case of marks it's token lists. Inserts are taken into
16account when breaking pages, and marks show up when a page has been broken and is
17presented to the output routine. Marks are used for running headers but other
18applications are possible.
19
20In \MKII\ marks are used to keep track of colors, transparencies and more
21properties that work across page boundaries. It permits picking up at the top of
22a page from where one left at the bottom of the preceding one. When \MKII\ was
23written there was only one mark so on top of that a multiple mark mechanism was
24implemented that filtered specific marks from a collection. Later, \ETEX\
25provided mark classes so that mechanism could be simplified. Although it is not
26that hard to do, this extension to \TEX\ didn't add any further features, so we
27can assume that there was no real demand for that. \footnote {This is probably
28true for most \LUATEX\ and \LUAMETATEX\ extensions, maybe example usage create
29retrospective demand. But one reason for picking up on engine development is that
30in the \CONTEXT\ perspective we actually had some demands.}
31
32But, marks have some nasty limitations, so from the \CONTEXT\ perspective there
33always was something to wish for. When you hide marks in boxes they will not be
34seen (the same is true for inserts). You cannot really reset them either. Okay,
35you can set them to nothing, but even then already present marks are still there.
36The \LUATEX\ engine has a \type {\clearmarks} primitive but that works global. In
37\LUAMETATEX\ a proper mark flusher is available. That engine also can work around
38the deeply nested disappearing marks. In addition, the current state of a mark
39can be queried and we have some tracing facilities.
40
41In \MKIV\ the engine's marks were not used at all and an alternative mechanism
42was written using \LUA. It actually is one of the older \MKIV\ features. It
43doesn't have the side effects that native marks have but it comes at the price of
44more overhead, although that is bearable.
45
46In this document we discuss marks but assume that \LUAMETATEX\ is used with
47\CONTEXT\ \LMTX. There we experiment with using the native marks, complemented by
48a few \LUA\ mechanisms, but it is to be seen if that will be either a replacement
49or an alternative.
50
51\stopsectionlevel
52
53\startsectionlevel[title=The basics]
54
55Although the original \TEX\ primitives are there, the plural \ETEX\ mark commands
56are to be used. Marks, signals with token lists, are set with:
57
58\starttyping[option=TEX]
59\marks0{This is mark 0} % equivalent to: \mark{This is mark 0}
60\marks4{This is mark 4}
61\stoptyping
62
63When a page has been split off, you can (normally this only makes sense in the
64output routine) access marks with:
65
66\starttyping[option=TEX]
67\topmarks  4
68\firstmarks4
69\botmarks  4
70\stoptyping
71
72A \quote {top} mark is the last one on the previous page(s), the \quote {first}
73and \quote {bottom} refer to the current page. A mark is a so called node,
74something that ends up in the current list and the token list is stored with it.
75The accessors are just commands and they fetch the token list from a separately
76managed storage. When you set or access a mark that has not yet been used, the
77storage is bumped to the right size, so it doesn't make sense to use e.g. \type
78{\marks 999} when there are no 998 ones too: it not only takes memory, it also
79makes \TEX\ run over all these mark stores when synchronization happens. The best
80way to make sure that you are sparse is:
81
82\starttyping[option=TEX]
83\newmarks\MyMark
84\stoptyping
85
86Currently the first 16 marks are skipped so this makes \type {\MyMark} become
87mark 17. The reason is that we want to make sure that users who experiment with
88marks have some scratch marks available and don't overload system defined ones.
89Future versions of \CONTEXT\ might become more restrictive.
90
91Marks can be cleared with:
92
93\starttyping[option=TEX]
94\clearmarks 4
95\stoptyping
96
97which clears the storage that keeps the top, first and bot marks. This happens
98immediately. You can delay this by putting a signal in the list:
99
100\starttyping[option=TEX]
101\flushmarks 4
102\stoptyping
103
104This (\LUAMETATEX) feature makes it for instance easy to reset marks that keep
105track of section (and lower) titles when a new chapter starts. Of course it still
106means that one has to implement some mechanism that deals with this but \CONTEXT\
107always had that.
108
109The current, latest assigned, value of a mark is available too:
110
111\starttyping[option=TEX]
112\currentmarks 4
113\stoptyping
114
115Using this value in for instance headers and footers makes no sense because the
116last node set can be on a following page.
117
118\stopsectionlevel
119
120\startsectionlevel[title=Migration]
121
122In the introduction we mentioned that \LUAMETATEX\ has migration built in. In
123\MKIV\ we have this as option too, but there it is delegated to \LUA. It permits
124deeply nested inserts (notes) and marks (but we don't use native marks in \MKIV).
125
126Migrated marks end up in the postmigrated sublist of a box. In other lowlevel
127manuals we discuss these pre- and postmigrated sublists. As example we use this
128definition:
129
130\startbuffer
131\setbox0\vbox\bgroup
132test \marks 4 {mark 4.1}\par
133test \marks 4 {mark 4.1}\par
134test \marks 4 {mark 4.1}\par
135\egroup
136\stopbuffer
137
138\typebuffer[option=TEX]
139
140% {\automigrationmode"FF \getbuffer\showbox0}
141% {\automigrationmode"00 \getbuffer\showbox0}
142
143When we turn migration on (officially the second bit):
144
145\starttyping[option=TEX]
146\automigrationmode"FF \showbox0
147\stoptyping
148
149we get this:
150
151\start \switchtobodyfont[5pt]
152\starttyping[option=TEX]
153> \box0=
1542:4: \vbox[normal][...], width 483.69687, height 63.43475, depth 0.15576, direction l2r
1552:4: .\list
1562:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
1572:4: ...\list
1582:4: ....\glue[left hang][...] 0.0pt
1592:4: ....\glue[left][...] 0.0pt
1602:4: ....\glue[parfillleft][...] 0.0pt
1612:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
1622:4: ....\glue[indent][...] 0.0pt
1632:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
1642:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
1652:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
1662:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
1672:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
1682:4: ....\penalty[line][...] 10000
1692:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
1702:4: ....\glue[right][...] 0.0pt
1712:4: ....\glue[right hang][...] 0.0pt
1722:4: ..\glue[par][...] 11.98988pt plus 3.99663pt minus 3.99663pt
1732:4: ..\glue[baseline][...] 8.34883pt
1742:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
1752:4: ...\list
1762:4: ....\glue[left hang][...] 0.0pt
1772:4: ....\glue[left][...] 0.0pt
1782:4: ....\glue[parfillleft][...] 0.0pt
1792:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
1802:4: ....\glue[indent][...] 0.0pt
1812:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
1822:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
1832:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
1842:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
1852:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
1862:4: ....\penalty[line][...] 10000
1872:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
1882:4: ....\glue[right][...] 0.0pt
1892:4: ....\glue[right hang][...] 0.0pt
1902:4: ..\glue[par][...] 11.98988pt plus 3.99663pt minus 3.99663pt
1912:4: ..\glue[baseline][...] 8.34883pt
1922:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
1932:4: ...\list
1942:4: ....\glue[left hang][...] 0.0pt
1952:4: ....\glue[left][...] 0.0pt
1962:4: ....\glue[parfillleft][...] 0.0pt
1972:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
1982:4: ....\glue[indent][...] 0.0pt
1992:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
2002:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
2012:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
2022:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
2032:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
2042:4: ....\penalty[line][...] 10000
2052:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
2062:4: ....\glue[right][...] 0.0pt
2072:4: ....\glue[right hang][...] 0.0pt
2082:4: .\postmigrated
2092:4: ..\mark[4][...]
2102:4: ..{mark 4.1}
2112:4: ..\mark[4][...]
2122:4: ..{mark 4.1}
2132:4: ..\mark[4][...]
2142:4: ..{mark 4.1}
215\stoptyping
216\stop
217
218When we don't migrate, enforced with:
219
220\starttyping[option=TEX]
221\automigrationmode"00 \showbox0
222\stoptyping
223
224the result is:
225
226\start \switchtobodyfont[5pt]
227\starttyping[option=TEX]
228> \box0=
2292:4: \vbox[normal][...], width 483.69687, height 63.43475, depth 0.15576, direction l2r
2302:4: .\list
2312:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
2322:4: ...\list
2332:4: ....\glue[left hang][...] 0.0pt
2342:4: ....\glue[left][...] 0.0pt
2352:4: ....\glue[parfillleft][...] 0.0pt
2362:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
2372:4: ....\glue[indent][...] 0.0pt
2382:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
2392:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
2402:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
2412:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
2422:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
2432:4: ....\penalty[line][...] 10000
2442:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
2452:4: ....\glue[right][...] 0.0pt
2462:4: ....\glue[right hang][...] 0.0pt
2472:4: ..\mark[4][...]
2482:4: ..{mark 4.1}
2492:4: ..\glue[par][...] 11.98988pt plus 3.99663pt minus 3.99663pt
2502:4: ..\glue[baseline][...] 8.34883pt
2512:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
2522:4: ...\list
2532:4: ....\glue[left hang][...] 0.0pt
2542:4: ....\glue[left][...] 0.0pt
2552:4: ....\glue[parfillleft][...] 0.0pt
2562:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
2572:4: ....\glue[indent][...] 0.0pt
2582:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
2592:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
2602:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
2612:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
2622:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
2632:4: ....\penalty[line][...] 10000
2642:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
2652:4: ....\glue[right][...] 0.0pt
2662:4: ....\glue[right hang][...] 0.0pt
2672:4: ..\mark[4][...]
2682:4: ..{mark 4.1}
2692:4: ..\glue[par][...] 11.98988pt plus 3.99663pt minus 3.99663pt
2702:4: ..\glue[baseline][...] 8.34883pt
2712:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
2722:4: ...\list
2732:4: ....\glue[left hang][...] 0.0pt
2742:4: ....\glue[left][...] 0.0pt
2752:4: ....\glue[parfillleft][...] 0.0pt
2762:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
2772:4: ....\glue[indent][...] 0.0pt
2782:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
2792:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
2802:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
2812:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
2822:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
2832:4: ....\penalty[line][...] 10000
2842:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
2852:4: ....\glue[right][...] 0.0pt
2862:4: ....\glue[right hang][...] 0.0pt
2872:4: ..\mark[4][...]
2882:4: ..{mark 4.1}
289\stoptyping
290\stop
291
292When you say \type {\showmakeup} or in this case \type {\showmakeup[mark]} the marks
293are visualized:
294
295\startlinecorrection
296    \startcombination
297        {\framed{\automigrationmode"FF \showmakeup[mark]\hsize2cm \getbuffer\box0}} {enabled}
298        {\framed{\automigrationmode"00 \showmakeup[mark]\hsize2cm \getbuffer\box0}} {disabled}
299    \stopcombination
300\stoplinecorrection
301
302Here \type {sm} means \quote {set mark} while \type {rm} would indicate a \quote
303{reset mark}. Of course migrated marks don't show up because these are bound to
304the box and thereby have become a a specific box property as can be seen in the
305above trace.
306
307\stopsectionlevel
308
309\startsectionlevel[title=Tracing]
310
311The \LUAMETATEX\ engine has a dedicated tracing option for marks. The fact that
312the traditional engine doesn't have this can be seen as indication that this is
313seldom needed.
314
315\starttyping[option=TEX]
316\tracingmarks1
317\tracingonline2
318\stoptyping
319
320When tracing is set to 1 we get a list of marks for the just split of page:
321
322\starttyping
3232:7: <mark class 51, top := bot>
3242:7: ..{sample 9.1}
3252:7: <mark class 51: first := mark>
3262:7: ..{sample 10.1}
3272:7: <mark class 51: bot := mark>
3282:7: ..{sample 10.1}
3292:7: <mark class 51, page state>
3302:7: ..top {sample 9.1}
3312:7: ..first {sample 10.1}
3322:7: ..bot {sample 10.1}
333\stoptyping
334
335When tracing is set to 2 you also get details we get a list of marks of the analysis:
336
337\starttyping
3381:9: <mark class 51, top := bot>
3391:9: ..{sample 5.1}
3401:9: <mark class 51: first := mark>
3411:9: ..{sample 6.1}
3421:9: <mark class 51: bot := mark>
3431:9: ..{sample 6.1}
3441:9: <mark class 51: bot := mark>
3451:9: ..{sample 7.1}
3461:9: <mark class 51: bot := mark>
3471:9: ..{sample 8.1}
3481:9: <mark class 51: bot := mark>
3491:9: ..{sample 9.1}
3501:9: <mark class 51, page state>
3511:9: ..top {sample 5.1}
3521:9: ..first {sample 6.1}
3531:9: ..bot {sample 9.1}
354\stoptyping
355
356\stopsectionlevel
357
358\startsectionlevel[title=High level commands]
359
360I think that not that many users define their own marks. They are useful for
361showing section related titles in headers and footers but the implementation of
362that is hidden. The native mark references are \type {top}, \type {first} and
363\type {bottom} but in the \CONTEXT\ interface we use different keywords.
364
365\starttabulate[|||||]
366\FL
367\BC \CONTEXT         \BC \TEX  \BC column                  \BC page                  \NC \NR
368\ML
369\NC \type {previous} \NC top   \NC last before sync        \NC last on previous page \NC \NR
370%NC \type {next}     \NC       \NC first after sync        \NC                       \NC \NR
371\NC \type {top}      \NC first \NC first in sync           \NC first on page         \NC \NR
372\NC \type {bottom}   \NC bot   \NC last in sync            \NC last on page          \NC \NR
373\NC \type {first}    \NC top   \NC first not top in sync   \NC first on page         \NC \NR
374\NC \type {last}     \NC bot   \NC last not bottom in sync \NC last on page          \NC \NR
375\ML
376\NC \type {default}  \NS[2][c] the same as \type {first} \NC \NR
377\NC \type {current}  \NS[2][c] the last set value        \NC \NR
378\LL
379\stoptabulate
380
381In order to separate marks in \CONTEXT\ from those in \TEX, the term \quote
382{marking} is used. In \MKIV\ the regular marks mechanism is of course there but,
383as mentioned, not used. By using a different namespace we could make the
384transition from \MKII\ to \MKIV\ (the same is true for some more mechanisms).
385
386A marking is defined with
387
388\starttyping[option=TEX]
389\definemarking[MyMark]
390\stoptyping
391
392A defined marking can be set with two equivalent commands:
393
394\starttyping[option=TEX]
395\setmarking[MyMark]{content}
396\marking   [MyMark]{content}
397\stoptyping
398
399The content is not typeset but stored as token list. In the sectioning mechanism
400that uses markings we don't even store titles, we store a reference to a title.
401In order to use that (deep down) we hook in a filter command. By default that command
402does nothing:
403
404\starttyping[option=TEX]
405\setupmarking[MyMark][filtercommand=\firstofoneargument]
406\stoptyping
407
408The token list does {\em not} get expanded by default, unless you set it up:
409
410\starttyping[option=TEX]
411\setupmarking[MyMark][expansion=yes]
412\stoptyping
413
414The current state of a marking can be cleared with:
415
416\starttyping[option=TEX]
417\clearmarking[MyMark]
418\stoptyping
419
420but because that en is not synchronized the real deal is:
421
422\starttyping[option=TEX]
423\resetmarking[MyMark]
424\stoptyping
425
426Be aware that it introduces a node in the list. You can test if a marking is
427defined with (as usual) a test macro. Contrary to (most) other test macros this
428one is fully expandable:
429
430\starttyping[option=TEX]
431\doifelsemarking {MyMark} {
432    defined
433} {
434    undefined
435}
436\stoptyping
437
438Because there can be a chain involved, we can relate markings. Think of sections
439below chapters and subsections below sections:
440
441\starttyping[option=TEX]
442\relatemarking[MyMark][YourMark]
443\stoptyping
444
445When a marking is set its relatives are also reset, so setting \type {YourMark}
446will reset \type {MyMark}. It is this kind of features that made for marks being
447wrapped into high level commands very early in the \CONTEXT\ development (and one
448can even argue that this is why a package like \CONTEXT\ exists in the first
449place).
450
451The rest of the (relatively small) repertoire of commands has to do with fetching
452markings. The general command is \type {\getmarking} that takes two or three
453arguments:
454
455\starttyping[option=TEX]
456\getmarking[MyMarking][first]
457\getmarking[MyMarking][page][first]
458\getmarking[MyMarking][page][first]
459\getmarking[MyMarking][column:1][first]
460\stoptyping
461
462There are (normally) three marks that can be fetched so we have three commands
463that do just that:
464
465\starttyping[option=TEX]
466\fetchonemark [MyMarking][which one]
467\fetchtwomarks[MyMarking]
468\fetchallmarks[MyMarking]
469\stoptyping
470
471You can setup a \type {separator} key which by default is:
472
473\starttyping[option=TEX]
474\setupmarking[MyMarking][separator=\space\emdash\space]
475\stoptyping
476
477Injection is enabled by default due to this default:
478
479\starttyping[option=TEX]
480\setupmarking[MyMarking][state=start]
481\stoptyping
482
483The following three variants are (what is called) fully expandable:
484
485\starttyping[option=TEX]
486\fetchonemarking [MyMarking][which one]
487\fetchtwomarkings[MyMarking]
488\fetchallmarkings[MyMarking]
489\stoptyping
490
491% \resetsynchronizemarking[#1]%
492% \synchronizemarking[#1][#2][#3]% (#3: options (no longer used))
493
494\stopsectionlevel
495
496\startsectionlevel[title=Pitfalls]
497
498The main pitfall is that a (re)setting a mark will inject a node which in
499vertical mode can interfere with spacing. In for instance section commands we
500wrap them with the title so there it should work out okay.
501
502\stopsectionlevel
503
504\stopdocument
505
506% Musical timestamp: videos showing up on YT with Nandi Bushell performing with
507% Dave Grohl (e.g. https://www.youtube.com/watch?v=_AVkGj41RuA) ... the highlight
508% of a nice and emotional thread of exchange between a young and capable energetic
509% drummer challenging an experienced musician. During the pandemic one could
510% witness quite some interesting musical experiments and Nandi and Yoyoka are some
511% inspiring discoveries.
512