strc-con.mklx /size: 42 Kb    last modification: 2025-02-21 11:03
1%D \module
2%D   [       file=strc-con,
3%D        version=2008.10.20,
4%D          title=\CONTEXT\ Structure Macros,
5%D       subtitle=Constructions,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{loading}{ConTeXt Structure Macros / Constructions}
15
16\registerctxluafile{strc-con}{}
17
18% todo: check why \copy .. probably mkii leftover
19%
20% todo: check if commands similar to lists
21% todo: \strc_constructions_setup_counter\strc_constructions_setup_counter{#1} in setup ... synchronization
22%
23% ? : \def\showdnlisttext{\constructionparameter\c!listtext}   % space in default
24%
25% maybe: pickup text and store in buffer ...
26%
27% \@@notemakeconstruction[##1]{}{##2}%
28% \expandafter\endgroup\noteparameter\c!next}}
29%
30% todo: \currentconstructionattribute : can be a counter instead
31
32%D Constructions are just descriptions but a bit more abstract so that we can
33%D conveniently build upon them. They are not really meant for users but module
34%D writers might find them useful. We mention a couple of parameters but these are
35%D only mentioned because in the shared code we map all resolvers to constructions.
36%D
37%D On top of constructions we build descriptions, enumerations, notes, labels and
38%D maybe some day more.
39
40\unprotect
41
42%D Todo:
43
44\installcorenamespace{construction}
45
46\installcommandhandler \??construction {construction} \??construction
47
48\aliased\let\setupconstructions\setupconstruction
49
50\setupconstructions[%
51    %c!title=,
52    %c!text=,
53    %
54    %c!style=,
55    %c!color=,
56    %c!command=,
57    %c!align=,
58    %
59    %c!headstyle=,
60    %c!headcolor=,
61    %c!headalign=,
62    %
63    %c!titlestyle=,
64    %c!titlecolor=,
65    %c!titlecommand=,
66    %c!titleleft=,
67    %c!titleright=,
68    %
69    %c!closesymbol=,
70    %c!closecommand=,
71    %
72    \c!alternative=\v!left,
73    \c!display=\v!yes,
74    \c!width=7\emwidth,
75    \c!distance=\emwidth,
76    \c!stretch=.50,
77    \c!shrink=.25,
78    \c!titledistance=.5\emwidth,
79    %c!hang=,
80    %c!sample=,
81    \c!margin=\v!no,
82    \c!before=\blank,
83    \c!inbetween=\blank,
84    \c!after=\blank,
85    %c!indentnext=,
86    %c!indenting=,
87    %
88    \c!expansion=\v!no,
89    %c!xmlsetup=,
90    %s!catcodes=,
91]
92
93%D Constructions and alike uses similar structures. In order to prevent issues
94%D we freeze some states. There is some overhead in the intermediate define
95%D step (as we could set them directly) but this is more flexible (and looks
96%D nicer). Keep in mind that descriptions, enumeration and notations are all
97%D independent and that we just remap the resolvers.
98
99% \defineconstruction[test][handler=description,level=1]
100% \defineconstruction[test][parent][handler=description,level=3]
101
102\installcorenamespace{constructionmain}  % frozen after definition
103\installcorenamespace{constructionlevel} % frozen after definition
104\installcorenamespace{constructionclass} % frozen after definition
105
106%aliased\let\currentconstructionhash           \??construction
107
108\mutable\lettonothing\currentconstructionmain
109\mutable\lettonothing\currentconstructionlevel
110\mutable\lettonothing\currentconstructionhandler
111\mutable\lettonothing\currentconstructionattribute
112\mutable\lettonothing\currentconstructionbookmark
113\mutable\lettonothing\currentconstructioncatcodes
114\mutable\lettonothing\currentconstructioncoding
115\mutable\lettonothing\currentconstructionexpansion
116\mutable\lettonothing\currentconstructionincrementnumber
117\mutable\lettonothing\currentconstructionlabel
118\mutable\lettonothing\currentconstructionlist
119\mutable\lettonothing\currentconstructionlistentry
120\mutable\lettonothing\currentconstructionlistnumber
121\mutable\lettonothing\currentconstructionmarking
122\mutable\lettonothing\currentconstructionnumber
123\mutable\lettonothing\currentconstructionreference
124\mutable\lettonothing\currentconstructionreferencetext
125\mutable\lettonothing\currentconstructionreferenceprefix
126\mutable\lettonothing\currentconstructionsynchronize
127\mutable\lettonothing\currentconstructiontitle
128\mutable\lettonothing\currentconstructionxmlsetup
129
130\newconditional\c_strc_constructions_define_commands \c_strc_constructions_define_commands\conditionaltrue % use with care, might become a proper key
131
132\appendtoks
133    \ifempty\currentconstructionparent
134        \letcsname\??constructionmain\currentconstruction\endcsname\currentconstruction
135        \definelist[\currentconstruction]% goodie
136    \else
137        \letcsname\??constructionmain\currentconstruction\endcsname\currentconstructionparent
138        \definelist[\currentconstruction][\currentconstructionparent]% goodie
139    \fi
140    \edefcsname\??constructionlevel\currentconstruction\endcsname{\number\constructionparameter\c!level}%
141    \edefcsname\??constructionclass\currentconstruction\endcsname{\constructionparameter\s!handler}%
142    \expandafter\newconditional\csname\??constructionclosesymbol\currentconstruction\endcsname
143\to \everydefineconstruction
144
145% todo: inhibit this when we have a different handle .. current we cannot do \frozen
146
147\appendtoks
148    \ifconditional\c_strc_constructions_define_commands
149        \protected\instance\edefcsname\e!start\currentconstruction\endcsname{\startnamedconstruction[\currentconstruction]}%
150        \protected\instance \defcsname\e!stop \currentconstruction\endcsname{\stopnamedconstruction}%
151    \fi
152\to \everydefineconstruction
153
154%D Just a basic environment (mostly for testing). We will provide a 'setup' based
155%D plugin once the rest is sorted out.
156
157\tolerant\permanent\protected\def\startnamedconstruction[#1]#*[#S#2]#*[#3]%
158  {\begingroup
159   \strc_constructions_initialize{#1}%
160   \strc_constructions_register[#3][\c!reference=,\c!title=,\c!bookmark=,\c!list=,\c!referencetext=,#2]%
161   \csname\??constructionstarthandler\currentconstructionhandler\endcsname}
162
163\permanent\protected\def\stopnamedconstruction
164  {\csname\??constructionstophandler\currentconstructionhandler\endcsname
165   \endgroup}
166
167%D As we will build on top of the generic construction mechanism we have handlers
168%D as a sort of plug in mechanism. In order to have some consistency we share
169%D some namespaces.
170
171\installcorenamespace{constructioninitializer}
172\installcorenamespace{constructionfinalizer}
173
174\installcorenamespace{constructionmainhandler}
175\installcorenamespace{constructioncommandhandler}
176\installcorenamespace{constructionstarthandler}
177\installcorenamespace{constructionstophandler}
178
179\installcorenamespace{constructiontexthandler}
180\installcorenamespace{constructionnotehandler}
181
182\protected\def\strc_constructions_initialize#1% class instance
183  {\cdef\currentconstruction{#1}%
184   \enforced\let\currentconstructionhash\??construction
185   \let\currentconstructionlistentry\!!zerocount
186   \enforced\expandafter\let\expandafter\currentconstructionmain   \csname\??constructionmain \currentconstruction\endcsname
187   \enforced\expandafter\let\expandafter\currentconstructionlevel  \csname\??constructionlevel\currentconstruction\endcsname
188   \enforced\expandafter\let\expandafter\currentconstructionhandler\csname\??constructionclass\currentconstruction\endcsname
189   \csname\??constructioninitializer\currentconstructionhandler\endcsname}
190
191\protected\def\strc_constructions_finalize
192  {\csname\??constructionfinalizer\currentconstructionhandler\endcsname
193   \strc_constructions_discard}
194
195\newconditional\c_strc_constructions_number_state
196\newconditional\c_strc_constructions_title_state
197
198\protected\defcsname\??constructioninitializer\v!construction\endcsname
199  {\c_strc_constructions_number_state\conditionalfalse
200   \c_strc_constructions_title_state\conditionalfalse}
201
202\protected\defcsname\??constructionfinalizer\v!construction\endcsname
203  {}
204
205%D We keep the command variant around but rather would move to the start-stop one.
206%D Also, passing the title as argument has some history so we need to keep that as
207%D well.
208
209% \ifdefined\dotagsetconstruction \else \aliased\let\dotagsetconstruction\relax \fi
210
211% \startuseMPgraphic{MyFrame}
212%     picture p ; numeric o ; path a, b ; pair c ;
213%     p := textext.rt("\FunnyFramed{\currentconstructiontext}") ;
214%   % p := textext.rt("\wrappedconstruction{\FunnyFramed{\currentconstructiontext}}") ;
215%   % p := textext.rt("\FunnyFramed{\wrappedconstruction{\currentconstructiontext}}") ;
216%   % p := textext.rt("\FunnyFramed{\wrappedcurrentconstruction}") ;
217%     ...
218% \stopuseMPgraphic
219%
220% \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
221%
222% \defineframedtext
223%   [MyText]
224%   [frame=off,
225%    background=MyFrame]
226%
227% \defineenumeration[Theorem]
228%   [alternative=empty,
229%    before=\startMyText,
230%    after=\stopMyText]
231
232\newtoks\everyconstruction
233
234\permanent\protected\def\currentconstructiontext
235  {\begstrut
236   \csname\??constructiontexthandler\currentconstructionhandler\endcsname
237   \endstrut}
238
239\permanent\protected\def\currentconstructionsample
240  {\begstrut
241   \constructionparameter\c!text
242   \p_strc_constructions_sample
243   \endstrut}
244
245\permanent\protected\def\wrappedconstruction#1%
246  {\begingroup
247     \iftrialtypesetting \else
248       \currentconstructionsynchronize
249       \c_attr_destination\currentconstructionattribute\relax
250     \fi
251     #1%
252   \endgroup}
253
254\permanent\protected\def\wrappedcurrentconstruction
255  {\begingroup
256     \iftrialtypesetting \else
257       \currentconstructionsynchronize
258       \c_attr_destination\currentconstructionattribute\relax
259     \fi
260     \currentconstructiontext
261   \endgroup}
262
263\protected\defcsname\??constructionmainhandler\v!construction\endcsname#1%
264  {\iftrialtypesetting \else
265     \begingroup
266     \currentconstructionsynchronize % reinstated
267     \c_attr_destination\currentconstructionattribute\relax % todo, whole text
268     \signalcharacter
269     \endgroup
270   \fi#1}
271
272\protected\defcsname\??constructiontexthandler\v!construction\endcsname
273  {\begingroup
274   \useconstructionstyleandcolor\c!headstyle\c!headcolor % move to \currentconstructiontext
275   \expand\everyconstruction
276   \constructionparameter\c!headcommand
277     {\strut
278      \constructionparameter\c!text
279      \clf_savedlisttitle{\currentconstructionmain}\currentconstructionlistentry\relax}%
280   \endgroup}
281
282\protected\def\strc_constructions_stored_start
283  {\begingroup % brrr \endgroup elsewhere ... will be sorted out
284   \csname\??constructionstarthandler\currentconstructionhandler\endcsname}
285
286\protected\def\strc_constructions_stored_stop
287  {\csname\??constructionstophandler\currentconstructionhandler\endcsname}
288
289\newconstant\c_strc_constructions_nested_state % to be redone
290
291% not used any more
292%
293% \def\resetconstructions % to be used in e.g. footnotes
294%   {\c_strc_constructions_nested_state\zerocount}
295
296\protected\defcsname\??constructioncommandhandler\v!construction\endcsname
297  {\endgroup}
298
299\lettonothing\p_strc_constructions_sample
300\lettonothing\p_strc_constructions_align
301\lettonothing\p_strc_constructions_indenting
302\lettonothing\p_strc_constructions_width
303\lettonothing\p_strc_constructions_aligntitle
304\lettonothing\p_strc_constructions_renderingsetup
305\lettonothing\p_strc_constructions_headalign
306\lettonothing\p_strc_constructions_hang
307\lettonothing\p_strc_constructions_inbetween
308\lettonothing\p_strc_constructions_closesymbol
309\lettonothing\p_strc_constructions_distance
310
311\newconditional\c_strc_constructions_distance_none
312
313\def\strc_constructions_set_width_and_distance
314  {\assignwidth
315     \p_strc_constructions_width
316     \constructionsheadwidth
317     {\unhcopy\constructionheadbox}
318     \constructionsheaddistance}
319
320\def\strc_constructions_preroll_head#content%
321  {\setbox\constructionheadbox\hbox
322     {\forgetall
323      \dontcomplain
324      \settrialtypesetting
325      \csname\??constructionmainhandler\currentconstructionhandler\endcsname#content}}
326
327\def\strc_constructions_ignore_head
328  {\constructionsheaddistance\zeropoint
329   \constructionsheadwidth   \zeropoint
330   % we also need to make sure that no stretch creeps in (new per 2015-02-02, for Alan)
331   \c_strc_constructions_distance_none\conditionaltrue}
332
333\protected\defcsname\??constructionstarthandler\v!construction\endcsname % this will be redone (reorganized) .. too much boxing
334  {\dostarttaggedchained\t!construction\currentconstruction\currentconstruction\currentconstructionhash
335%    \dotagsetconstruction
336   \constructionparameter\c!before
337   \begingroup
338   \edef\currentconstructionalternative{\constructionparameter\c!alternative}%
339   \edef\p_strc_constructions_renderingsetup{\constructionalternativeparameter\c!renderingsetup}%
340   % catch fuzzyness
341   \ifempty\p_strc_constructions_renderingsetup
342      \letconstructionparameter\c!alternative\v!left
343      \let\currentconstructionalternative\v!left
344      \edef\p_strc_constructions_renderingsetup{\constructionalternativeparameter\c!renderingsetup}%
345   \else
346     \doifnotsetups\p_strc_constructions_renderingsetup
347       {\letconstructionparameter\c!alternative\v!left
348        \let\currentconstructionalternative\v!left
349        \edef\p_strc_constructions_renderingsetup{\constructionalternativeparameter\c!renderingsetup}}%
350   \fi
351   %
352   \doadaptleftskip{\constructionparameter\c!margin}%
353   \setlocalhsize % so we can use \localhsize in width assignments
354   \edef\p_strc_constructions_distance{\constructionalternativeparameter\c!distance}%
355   \edef\p_strc_constructions_width{\constructionalternativeparameter\c!width}%
356   \ifx\p_strc_constructions_distance\v!none
357     \c_strc_constructions_distance_none\conditionaltrue
358     \constructionsheaddistance\zeropoint
359   \else
360     \c_strc_constructions_distance_none\conditionalfalse
361     \constructionsheaddistance\p_strc_constructions_distance\relax
362     \ifdim\constructionsheaddistance=\zeropoint
363       \ifx\p_strc_constructions_width\v!broad
364         \constructionsheaddistance\emwidth
365       \orelse\ifx\p_strc_constructions_width\v!line
366         \constructionsheaddistance\emwidth
367       \fi
368     \fi
369   \fi
370   % inefficient and not always needed, for instance not with margins so we will make checkers
371   % per alternative some day (especially in labels this is unwanted overhead)
372   %
373   % maybe we should have an option as i cannot oversee the consequences now
374   %
375   % \edef\p_strc_constructions_sample{\constructionparameter\c!sample}%
376   % \ifempty\p_strc_constructions_sample
377   %   \strc_constructions_preroll_head\currentconstructiontext
378   % \else
379   %   \strc_constructions_preroll_head\currentconstructiontextsample
380   % \fi
381   % \strc_constructions_set_width_and_distance
382   %
383   \strc_constructions_preroll_head\currentconstructiontext
384   \ifzeropt\wd\constructionheadbox
385     \strc_constructions_ignore_head
386   \else
387     \edef\p_strc_constructions_sample{\constructionparameter\c!sample}%
388     \ifempty\p_strc_constructions_sample
389       \strc_constructions_set_width_and_distance
390     \else
391       \strc_constructions_preroll_head\currentconstructionsample
392       \ifzeropt\wd\constructionheadbox
393         \strc_constructions_ignore_head
394       \else
395         \strc_constructions_set_width_and_distance
396       \fi
397     \fi
398   \fi
399   %
400   \dostarttaggednodetail\t!constructiontag % todo
401   \setbox\constructionheadbox\hbox
402     {\scratchskip\parindent
403      \forgetall
404      \dontcomplain
405      % new and under testing
406      \ifcstok{\constructionparameter\c!headindenting}\v!yes
407        \hskip\scratchskip
408      \fi
409      %
410      \ifx\currentconstructionalternative\v!serried % brrr, hack, will change
411        \csname\??constructionmainhandler\currentconstructionhandler\endcsname\currentconstructiontext
412      \else
413        \csname\??constructionmainhandler\currentconstructionhandler\endcsname{\boxedconstructionhead\currentconstructiontext}%
414      \fi}%
415   \dostoptagged % tag
416   \edef\p_strc_constructions_aligntitle{\constructionparameter\c!aligntitle}%
417   \ifx\p_strc_constructions_aligntitle\v!no
418     \leftconstructionskip \leftskip
419     \rightconstructionskip\rightskip
420   \orelse\ifcase\c_strc_constructions_nested_state
421     \leftconstructionskip \leftskip
422     \rightconstructionskip\rightskip
423   \fi
424   \edef\p_strc_constructions_align{\constructionparameter\c!align}%
425   \ifempty\p_strc_constructions_align \else
426     \setupalign[\p_strc_constructions_align]% \use...
427   \fi
428   \ifcase\c_strc_constructions_nested_state
429     \c_strc_constructions_nested_state\plusone
430   \or
431     \c_strc_constructions_nested_state\plustwo
432   \fi
433   \strc_constructions_close_symbol_reset
434   %
435   \edef\p_strc_constructions_headalign{\constructionparameter\c!headalign}%
436   %
437   \directsetup\p_strc_constructions_renderingsetup\relax
438   % moved to here 2014-07-03
439   % we'd like to use \useindentingparameter\constructionparameter but ...
440   \edef\p_strc_constructions_indenting{\constructionparameter\c!indenting}%
441   \ifempty\p_strc_constructions_indenting \else
442     \c_spac_indentation_indent_first\conditionaltrue % recently added, better no v!reset
443     \indenting[\v!first,\p_strc_constructions_indenting]% Wolfgang needs to check this
444   \fi
445   %
446   \dostarttaggednodetail\t!constructioncontent
447  %\freezeparagraphproperties
448   \updateparagraphshapes
449   \ignorespaces} % args not needed
450
451% This is why we need the \v!first in indentation above
452%
453% \defineenumeration
454%   [foo]
455%   [alternative=serried,
456%    indenting={yes,medium}]
457%
458% \startitemize
459%     \startitem
460%         \startfoo
461%             AAA\par
462%             BBB\par
463%             CCC\par
464%             DDD\par
465%         \stopfoo
466%     \stopitem
467% \stopitemize
468
469\protected\defcsname\??constructionstophandler\v!construction\endcsname
470  {\strc_constructions_close_symbol_place
471   \ifcstok{\constructionparameter\c!display}\v!no\else
472     \par
473   \fi
474   \dostoptagged % content
475   \dostoptagged % construction
476   \endgroup
477   \constructionparameter\c!after
478   \useindentnextparameter\constructionparameter
479   \strc_constructions_finalize
480%   \endgroup
481   \dorechecknextindentation}
482
483\permanent\protected\def\boxedconstructionhead#1%
484  {\ifcstok{\constructionalternativeparameter\c!alignbottom}\v!yes \vbox \else \vtop \fi
485     \bgroup
486       \hsize\constructionsheadwidth
487       \edef\p_strc_constructions_headalign{\constructionparameter\c!headalign}%
488       \ifempty\p_strc_constructions_headalign \else
489         \setupalign[\p_strc_constructions_headalign]% \use...
490       \fi
491       #1%
492     \egroup}
493
494\installcorenamespace{constructionalternative}
495\installcorenamespace{constructionrenderings}
496
497% see lists: alternativemethods ... todo
498%
499% there will be a proper interface to variables
500
501\installcommandhandler \??constructionalternative {constructionalternative} \??constructionalternative
502
503\setupconstructionalternative
504  [%c!left=, % no inheritance
505   %c!right=,% no inheritance
506   \c!width=\constructionparameter\c!width,
507   \c!distance=\constructionparameter\c!distance,
508   \c!stretch=\constructionparameter\c!stretch,
509   \c!shrink=\constructionparameter\c!shrink]
510
511\defineconstructionalternative
512  [\v!left]
513  [%\c!width=7em,
514   %\c!distance=1em,
515   \c!renderingsetup=\??constructionrenderings:\v!left]
516
517\defineconstructionalternative
518  [\v!right]
519  [%\c!width=7em,
520   %\c!distance=1em,
521   \c!renderingsetup=\??constructionrenderings:\v!right]
522
523\defineconstructionalternative
524  [\v!inmargin]
525  [\c!renderingsetup=\??constructionrenderings:\v!inmargin]
526
527\defineconstructionalternative
528  [\v!inleft]
529  [\c!renderingsetup=\??constructionrenderings:\v!inleft]
530
531\defineconstructionalternative
532  [\v!inright]
533  [\c!renderingsetup=\??constructionrenderings:\v!inright]
534
535\defineconstructionalternative
536  [\v!margin]
537  [\c!renderingsetup=\??constructionrenderings:\v!margin]
538
539\defineconstructionalternative
540  [\v!leftmargin]
541  [\c!renderingsetup=\??constructionrenderings:\v!leftmargin]
542
543\defineconstructionalternative
544  [\v!rightmargin]
545  [\c!renderingsetup=\??constructionrenderings:\v!rightmargin]
546
547\defineconstructionalternative
548  [\v!innermargin]
549  [\c!renderingsetup=\??constructionrenderings:\v!innermargin]
550
551\defineconstructionalternative
552  [\v!outermargin]
553  [\c!renderingsetup=\??constructionrenderings:\v!outermargin]
554
555\defineconstructionalternative
556  [\v!serried]
557  [\c!renderingsetup=\??constructionrenderings:\v!serried]
558
559\defineconstructionalternative
560  [\v!hanging]
561  [%\c!width=.75\emwidth
562   \c!renderingsetup=\??constructionrenderings:\v!hanging]
563
564\defineconstructionalternative
565  [\v!top]
566  [\c!renderingsetup=\??constructionrenderings:\v!top,
567   \c!width=\localhsize]
568
569\defineconstructionalternative
570  [\v!command]
571  [\c!renderingsetup=\??constructionrenderings:\v!command]
572
573\defineconstructionalternative
574  [\v!empty]
575  [\c!renderingsetup=\??constructionrenderings:\v!empty]
576
577\defineconstructionalternative
578  [\v!label]
579  [\c!renderingsetup=\??constructionrenderings:\v!label,
580   \c!width=]
581
582\newbox      \constructionheadbox
583\newgluespec \leftconstructionskip
584\newgluespec \rightconstructionskip
585\newdimension\constructionsheadwidth
586\newdimension\constructionsheaddistance
587
588\def\strc_constructions_set_hang_box#1% messy left/rightskip
589  {\setbox\constructionheadbox\vtop   % \vbox gaat fout in hang
590     {\forgetall
591      \dontcomplain
592      \hsize\constructionsheadwidth\relax
593      \ifempty\p_strc_constructions_headalign
594        \setupalign[#1]% use fast one
595      \else
596        \setupalign[\p_strc_constructions_headalign]% use fast one
597      \fi
598      \ifconditional\c_strc_constructions_distance_none \else
599        \advanceby\ifx#1\v!flushleft\rightskip\else\leftskip\fi\constructionsheaddistance % only difference and wrong anyway
600      \fi
601      \flushconstructionheadbox}%
602   \setbox\constructionheadbox\hpack{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
603   \ht\constructionheadbox\strutht
604   \dp\constructionheadbox\strutdp}
605
606\def\strc_constructions_set_pure_box#1% default ... better set up differently
607  {\setbox\constructionheadbox\vtop
608     {\forgetall
609      \dontcomplain
610      \hsize\constructionsheadwidth\relax
611      \ifempty\p_strc_constructions_headalign
612        \setupalign[#1]% use fast one
613      \else
614        \setupalign[\p_strc_constructions_headalign]% use fast one
615      \fi
616      \flushconstructionheadbox}%
617   \setbox\constructionheadbox\hpack{\box\constructionheadbox}% needed in case of e.g. a real big head font, see descriptions-006.tex
618   \ht\constructionheadbox\strutht
619   \dp\constructionheadbox\strutdp}
620
621\def\strc_constructions_set_hang#1%
622  {\ifempty\p_strc_constructions_hang
623     % nothing
624   \orelse\ifx\p_strc_constructions_hang\v!fit
625     \scratchdimen\htdp\constructionheadbox
626     \getnoflines\scratchdimen
627     \hangafter-\noflines
628   \orelse\ifx\p_strc_constructions_hang\v!broad
629     \scratchdimen{\htdp\constructionheadbox+.5\strutht}%
630     \getnoflines\scratchdimen
631     \hangafter-\noflines
632   \else
633     \hangafter-\p_strc_constructions_hang
634   \fi
635   \relax
636   \hangindent\ifx#1\v!right-\fi\constructionsheadwidth}
637
638\permanent\protected\def\flushconstructionheadbox
639  {\ifhbox\constructionheadbox\unhbox\else\box\fi\constructionheadbox}
640
641% The setups. These only deal with placement of the descriptor and initializing the
642% environment. The wrapping happens elsewhere.
643
644% todo: optimize the setups with
645%
646% \ifconditional\c_strc_constructions_distance_none : no need for skip
647% \ifzeropt\wd\constructionheadbox : no need for box and skips
648
649\startsetups[\??constructionrenderings:\v!left]
650    \edef\p_strc_constructions_hang{\constructionparameter\c!hang}%
651    \doifelsesetups{\??constructionrenderings:\v!left:\p_strc_constructions_hang} {
652        \directsetup{\??constructionrenderings:\v!left:\p_strc_constructions_hang}
653    } {
654        \directsetup{\??constructionrenderings:\v!left:\v!hanging}
655    }
656\stopsetups
657
658\startsetups[\??constructionrenderings:\v!right]
659    \edef\p_strc_constructions_hang{\constructionparameter\c!hang}
660    \doifelsesetups{\??constructionrenderings:\v!right:\p_strc_constructions_hang} {
661        \directsetup{\??constructionrenderings:\v!right:\p_strc_constructions_hang}
662    } {
663        \directsetup{\??constructionrenderings:\v!right:\v!hanging}
664    }
665\stopsetups
666
667\startsetups[\??constructionrenderings:\v!left:\v!none]
668    \enforced\let\\\crlf
669    \noindent
670    \strc_constructions_set_pure_box\v!flushleft
671    \leftskip{\leftconstructionskip+\constructionsheadwidth+\constructionsheaddistance}%
672    \rightskip\rightconstructionskip\relax
673    \llap {
674        \hpack to \leftskip {
675            \hskip\leftconstructionskip
676            \box\constructionheadbox % was copy
677            \hss
678        }
679    }
680    \nobreak
681    \useconstructionstyleandcolor\c!style\c!color
682    \ignorespaces
683\stopsetups
684
685\startsetups[\??constructionrenderings:\v!left:0]
686    \directsetup{\??constructionrenderings:\v!left:\v!none}
687\stopsetups
688
689\startsetups[\??constructionrenderings:\v!left:]
690    \directsetup{\??constructionrenderings:\v!left:\v!none}
691\stopsetups
692
693\startsetups[\??constructionrenderings:\v!right:\v!none]
694    \enforced\let\\\crlf
695    \noindent
696    \leftskip\leftconstructionskip
697    \rightskip{\rightconstructionskip+\constructionsheadwidth}%
698   %\strc_constructions_pure_hang_box\raggedleft
699    \strc_constructions_set_pure_box\v!flushright
700    \rlap {
701        \hskip{\hsize-\leftskip-\rightskip}%
702        \copy\constructionheadbox
703        \hskip\rightconstructionskip
704    }
705    \nobreak
706    \advanceby\rightskip \constructionsheaddistance
707    \useconstructionstyleandcolor\c!style\c!color
708    \ignorespaces
709\stopsetups
710
711\startsetups[\??constructionrenderings:\v!right:0]
712    \directsetup{\??constructionrenderings:\v!right:\v!none}
713\stopsetups
714
715\startsetups[\??constructionrenderings:\v!right:]
716    \directsetup{\??constructionrenderings:\v!right:\v!none}
717\stopsetups
718
719\startsetups[\??constructionrenderings:\v!left:\v!margin]%
720    \enforced\let\\\crlf
721    \noindent
722    \strc_constructions_set_pure_box\v!flushleft
723    \llap {
724        \hpack to \constructionsheadwidth {
725            \box\constructionheadbox % was copy
726            \hss
727        }
728        \hskip\constructionsheaddistance
729    }
730    \useconstructionstyleandcolor\c!style\c!color
731    \ignorespaces
732\stopsetups
733
734\startsetups[\??constructionrenderings:\v!right:\v!margin]%
735    \enforced\let\\\crlf
736    \noindent
737    \strc_constructions_set_pure_box\v!flushright
738    \rlap {
739        \hskip\constructionsheaddistance
740        \hpack to \constructionsheadwidth {
741            \box\constructionheadbox % was copy
742            \hss
743        }
744    }
745    \useconstructionstyleandcolor\c!style\c!color
746    \ignorespaces
747\stopsetups
748
749\startsetups[\??constructionrenderings:\v!left:\v!hanging]%
750    \enforced\let\\\crlf
751    \dontcomplain
752    \advanceby\constructionsheadwidth \constructionsheaddistance
753    \strc_constructions_set_hang_box\v!flushleft
754    \strc_constructions_set_hang\v!left
755    \noindent
756    \llap {
757        \tpack to \zeropoint {
758            \box\constructionheadbox
759        }
760    }
761    \nobreak
762    \useconstructionstyleandcolor\c!style\c!color
763    \ignorespaces
764\stopsetups
765
766\startsetups[\??constructionrenderings:\v!right:\v!hanging]%
767    \enforced\let\\\crlf
768    \dontcomplain
769    \advanceby\constructionsheadwidth \constructionsheaddistance
770    \strc_constructions_set_hang_box\v!flushright
771    \strc_constructions_set_hang\v!right
772    \noindent
773    \rlap {
774        \hpack to {\hsize-\leftskip-\rightskip} {
775            \hss
776            \tpack to \zeropoint {
777                \box\constructionheadbox
778            }
779        }
780    }
781    \nobreak
782    \useconstructionstyleandcolor\c!style\c!color
783    \ignorespaces
784\stopsetups
785
786\startsetups[\??constructionrenderings:\v!top]
787  % \strc_sectioning_prevent_page_break % commented per 31/5/2019
788    \enforced\let\\\space
789    \noindent
790    \copy\constructionheadbox % why copy ?
791    \par
792    \nobreak
793    \edef\p_strc_constructions_inbetween{\constructionparameter\c!inbetween}%
794    \ifempty\p_strc_constructions_inbetween \else
795      \p_strc_constructions_inbetween
796      % shouldn't this move to after the fi?
797      \directcheckedvspacing\v!samepage
798    \fi
799    \useconstructionstyleandcolor\c!style\c!color
800    \ignorespaces
801\stopsetups
802
803% why copy? historic reason?
804
805\startsetups[\??constructionrenderings:\v!margin]
806    \enforced\let\\\crlf
807    \noindent
808    \inmargin[\c!scope=\v!local]{\flushconstructionheadbox}%
809    \useconstructionstyleandcolor\c!style\c!color
810    \ignorespaces
811\stopsetups
812
813\startsetups[\??constructionrenderings:\v!leftmargin]
814    \enforced\let\\\crlf
815    \noindent
816    \inleft[\c!scope=\v!local]{\flushconstructionheadbox}%
817    \useconstructionstyleandcolor\c!style\c!color
818    \ignorespaces
819\stopsetups
820
821\startsetups[\??constructionrenderings:\v!rightmargin]
822    \enforced\let\\\crlf
823    \noindent
824    \inright[\c!scope=\v!local]{\flushconstructionheadbox}%
825    \useconstructionstyleandcolor\c!style\c!color
826    \ignorespaces
827\stopsetups
828
829\startsetups[\??constructionrenderings:\v!innermargin]
830    \enforced\let\\\crlf
831    \noindent
832    \ininner[\c!scope=\v!local]{\flushconstructionheadbox}%
833    \useconstructionstyleandcolor\c!style\c!color
834    \ignorespaces
835\stopsetups
836
837\startsetups[\??constructionrenderings:\v!outermargin]
838    \enforced\let\\\crlf
839    \noindent
840    \inouter[\c!scope=\v!local]{\flushconstructionheadbox}%
841    \useconstructionstyleandcolor\c!style\c!color
842    \ignorespaces
843\stopsetups
844
845\startsetups[\??constructionrenderings:\v!inmargin]
846    \directsetup{\??constructionrenderings:\v!margin}
847\stopsetups
848
849\startsetups[\??constructionrenderings:\v!inleft]
850    \directsetup{\??constructionrenderings:\v!leftmargin}
851\stopsetups
852
853\startsetups[\??constructionrenderings:\v!inright]
854    \directsetup{\??constructionrenderings:\v!rightmargin}
855\stopsetups
856
857\startsetups[\??constructionrenderings:\v!serried]
858    % already set?
859    \edef\p_strc_constructions_width{\constructionparameter\c!width}% CHECK ! ! ! wrong parameter namespace
860    \doifelsesetups{\??constructionrenderings:\v!serried:\p_strc_constructions_width} {
861        \directsetup{\??constructionrenderings:\v!serried:\p_strc_constructions_width}
862    } {
863        \directsetup{\??constructionrenderings:\v!serried:\v!wide}
864    }
865\stopsetups
866
867\startsetups[\??constructionrenderings:\v!serried:\v!fit]
868    \enforced\let\\\crlf
869    \noindent
870    \flushconstructionheadbox
871    \nobreak
872    \hskip\constructionsheaddistance\relax
873    \useconstructionstyleandcolor\c!style\c!color
874    \ignorespaces
875\stopsetups
876
877\startsetups[\??constructionrenderings:\v!serried:\v!broad]
878    \enforced\let\\\crlf
879    \noindent
880    \flushconstructionheadbox
881    \ifconditional\c_strc_constructions_distance_none \else
882        \nobreak
883        \hskip\constructionsheaddistance
884          \s!plus \constructionalternativeparameter\c!stretch\constructionsheaddistance
885          \s!minus\constructionalternativeparameter\c!shrink \constructionsheaddistance
886        \relax
887    \fi
888    \useconstructionstyleandcolor\c!style\c!color
889    \ignorespaces
890\stopsetups
891
892\startsetups[\??constructionrenderings:\v!serried:]
893    \directsetup{\??constructionrenderings:\v!serried:\v!broad}
894\stopsetups
895
896\startsetups[\??constructionrenderings:\v!serried:\v!wide]
897    \enforced\let\\\crlf
898    \noindent
899    \hbox to \constructionsheadwidth {
900        \flushconstructionheadbox
901        \hss
902    }
903    \nobreak
904    \hskip\constructionsheaddistance\relax
905    \useconstructionstyleandcolor\c!style\c!color
906    \ignorespaces
907\stopsetups
908
909\startsetups[\??constructionrenderings:\v!hanging]
910    % tricky: leftskipadaption is somewhat unpredictable
911    \enforced\let\\\crlf
912    \noindent
913    \advanceby\leftskip-\leftskipadaption\relax
914    \ifdim\leftskipadaption=\zeropoint
915        \leftskipadaption1.5\emwidth\relax % just some default
916        \ifnum\c_strc_constructions_nested_state=\plusone
917            \ifdim\leftskip>\zeropoint \relax
918                \leftskipadaption\leftskip
919            \fi
920        \fi
921    \fi
922    \ifnum\c_strc_constructions_nested_state>\zerocount % was \ifnum\c_strc_constructions_nested_state=\plusone
923        \advanceby\leftskip\leftskipadaption % but we're already further on
924    \fi
925    \hskip-\leftskipadaption\relax
926    \ifhbox\constructionheadbox \unhbox\else\box\fi\constructionheadbox
927    \ifconditional\c_strc_constructions_distance_none \else
928      % we used to have just a kern, but long lines look bad then
929      \scratchdistance\ifdim\constructionsheaddistance=\zeropoint .75\emwidth\else\constructionsheaddistance\fi
930      \hskip \scratchdistance
931        \s!plus \constructionalternativeparameter\c!stretch\scratchdistance
932        \s!minus\constructionalternativeparameter\c!shrink \scratchdistance
933    \fi
934    \ifhmode
935        \ifx\p_strc_constructions_width\v!line
936            \hfill\break
937        \else
938            \allowbreak
939        \fi
940    \fi
941    \useconstructionstyleandcolor\c!style\c!color
942    \ignorespaces
943\stopsetups
944
945%D \starttyping
946%D \setupfootnotation[location=command,headcommand=\llap]
947%D \stoptyping
948
949\startsetups[\??constructionrenderings:\v!command]
950    \noindent
951    \constructionparameter\c!headcommand{\flushconstructionheadbox}
952    \useconstructionstyleandcolor\c!style\c!color
953    \ignorespaces
954\stopsetups
955
956\startsetups[\??constructionrenderings:\v!empty]
957    \noindent
958    \useconstructionstyleandcolor\c!style\c!color
959    \ignorespaces
960\stopsetups
961
962\startsetups[\??constructionrenderings:\v!label]
963    \dontleavehmode
964    \begingroup
965    \constructionparameter\c!headcommand{\flushconstructionheadbox}
966    \endgroup
967\stopsetups
968
969% \definedescription[whatever][alternative=right:bottom]
970%
971% \startwhatever{just a small\\example}
972%     \input ward
973% \stopwhatever
974
975\defineconstructionalternative
976  [\v!right:\v!bottom]
977  [%\c!width=7em,
978   %\c!distance=1em,
979   \c!alignbottom=\v!yes,
980   \c!renderingsetup=\??constructionrenderings:\v!right:\v!bottom]
981
982\startsetups[\??constructionrenderings:\v!right:\v!bottom]
983    \enforced\let\\\crlf
984    \noindent
985    \leftskip\leftconstructionskip
986    \rightskip{\rightconstructionskip+\constructionsheadwidth+\constructionsheaddistance}%
987    \parfillskip\zeroskip
988    \strc_constructions_set_pure_box\v!flushright
989    \directparwrapper \relax {%
990      \hfilll
991      \rlap
992        {\kern\constructionsheaddistance
993         \copy\constructionheadbox}%
994    }%
995    \useconstructionstyleandcolor\c!style\c!color
996    \ignorespaces
997\stopsetups
998
999%D This next feature will get an lmtx implementation (probably by using a new generic
1000%D close mechanism).
1001
1002% you can use \placeclosesymbol or \qed to place a symbol at the end of a
1003% construction
1004
1005\installcorenamespace{constructionclosesymbol}
1006
1007\mutable\let\placeclosesymbol\donothing
1008\mutable\let\qed             \donothing
1009
1010\def\strc_constructions_close_symbol_reset % no need for global
1011  {\global\csname\??constructionclosesymbol\currentconstruction\endcsname\conditionaltrue
1012   \let\placeclosesymbol\strc_constructions_close_symbol_place
1013   \let\qed             \strc_constructions_close_symbol_place}
1014
1015\protected\def\strc_constructions_close_symbol_place
1016  {\ifconditional\csname\??constructionclosesymbol\currentconstruction\endcsname
1017     \global\csname\??constructionclosesymbol\currentconstruction\endcsname\conditionalfalse
1018     \edef\p_strc_constructions_closesymbol{\constructionparameter\c!closesymbol}%
1019     \ifempty\p_strc_constructions_closesymbol \else
1020       \constructionparameter\c!closecommand{\p_strc_constructions_closesymbol}% hm why {} maybe because box expected
1021     \fi
1022   \fi}
1023
1024\newif\ifnoconstructioncaption
1025
1026%D The storage macros:
1027
1028\mutable\let\currentconstructionlistentry\!!zerocount
1029
1030\protected\def\strc_constructions_register
1031  {\clf_doifelselisthasentry{\currentconstructionlistentry}%
1032     \strc_constructions_register_nop
1033     \strc_constructions_register_yes}
1034
1035% \def\strc_constructions_register{\strc_constructions_register_yes}
1036
1037\def\strc_constructions_register_nop[#S#1][#S#2]% #1=optional user data #2=interfaced-settings
1038 %{\writestatus{constructions}{reusing \currentconstruction: \number\currentconstructionlistentry}}
1039  {}
1040
1041\def\strc_constructions_discard
1042  {\iftrialtypesetting
1043   % \writestatus{constructions}{discarding \currentconstruction: \number\currentconstructionlistentry}%
1044     \clf_discardfromlist\currentconstructionlistentry\relax
1045   \fi}
1046
1047\let\currentconstructionlistnumber \!!zerocount
1048\let\currentconstructionsynchronize\relax
1049\let\currentconstructionattribute  \attributeunsetvalue
1050
1051\def\strc_constructions_register_yes[#S#1][#S#2]% #1=optional user data #2=interfaced-settings
1052  {\begingroup                              % similar to structure so we might generalize this
1053   \setupcurrentconstruction[#2]%           % xdef's will become edef's
1054   \xdef\currentconstructionexpansion      {\constructionparameter\c!expansion}%
1055   \xdef\currentconstructionxmlsetup       {\constructionparameter\c!xmlsetup}%
1056   \xdef\currentconstructioncatcodes       {\constructionparameter\s!catcodes}%
1057   \xdef\currentconstructionlabel          {\constructionparameter\c!label}%
1058   \xdef\currentconstructionreference      {\constructionparameter\c!reference}%
1059   \xdef\currentconstructionreferencetext  {\constructionparameter\c!referencetext}%
1060   \xdef\currentconstructionreferenceprefix{\constructionparameter\c!referenceprefix}%
1061   %xdef\currentconstructionshownumber     {\constructionparameter\c!number}%
1062   \xdef\currentconstructionincrementnumber{\constructionparameter\c!incrementnumber}%
1063   %
1064   \ifempty\currentconstructionexpansion
1065     \glet\currentconstructionexpansion\v!no
1066   \fi
1067   %
1068   \ifempty\currentconstructionreferenceprefix
1069     \glet\currentconstructionreferenceprefix\referenceprefix
1070   \fi
1071   \ifx\currentconstructionexpansion\s!xml
1072     \xmlstartraw
1073       \xdef\currentconstructiontitle        {\constructionparameter\c!title}%
1074       \xdef\currentconstructionbookmark     {\constructionparameter\c!bookmark}%
1075       \xdef\currentconstructionmarking      {\constructionparameter\c!marking}%
1076       \xdef\currentconstructionlist         {\constructionparameter\c!list}%
1077       \xdef\currentconstructionreferencetext{\constructionparameter\c!referencetext}%
1078     \xmlstopraw
1079     \ifempty\currentconstructionlist
1080       \glet\currentconstructionlist\currentconstructiontitle
1081     \fi
1082     \glet\currentconstructioncoding\s!xml
1083   \else
1084     \ifx\currentconstructionexpansion\v!yes
1085       \xdef\currentconstructiontitle        {\constructionparameter\c!title}%
1086       \xdef\currentconstructionbookmark     {\constructionparameter\c!bookmark}%
1087       \xdef\currentconstructionmarking      {\constructionparameter\c!marking}%
1088       \xdef\currentconstructionlist         {\constructionparameter\c!list}%
1089       \xdef\currentconstructionreferencetext{\constructionparameter\c!referencetext}%
1090     \else
1091       \xdef\currentconstructiontitle        {\detokenizedconstructionparameter\c!title}%
1092       \xdef\currentconstructionbookmark     {\detokenizedconstructionparameter\c!bookmark}%
1093       \xdef\currentconstructionmarking      {\detokenizedconstructionparameter\c!marking}%
1094       \xdef\currentconstructionlist         {\detokenizedconstructionparameter\c!list}%
1095       \xdef\currentconstructionreferencetext{\detokenizedconstructionparameter\c!referencetext}%
1096       \iflocation \ifempty\currentconstructionbookmark
1097         \begingroup
1098         \simplifycommands
1099         \xdef\currentconstructionbookmark{\detokenize\expandafter{\normalexpanded{\constructionparameter\c!title}}}%
1100         \endgroup
1101       \fi \fi
1102     \fi
1103     \ifempty\currentconstructionlist
1104       \glet\currentconstructionlist\currentconstructiontitle
1105     \fi
1106     \glet\currentconstructioncoding\s!tex
1107   \fi
1108   %
1109   \ifx\currentconstructiontitle\v!none % will become obsolete
1110     \global\noconstructioncaptiontrue
1111   \fi
1112   %
1113   \ifnoconstructioncaption % then why analyze anyway?
1114     \endgroup
1115     \let\currentconstructionlistnumber \relax
1116     \let\currentconstructionsynchronize\relax
1117     \let\currentconstructionattribute  \relax
1118   \else
1119     \setnextinternalreferences{construction}\currentconstructionmain % plural
1120     \relax
1121     \scratchcounter\clf_addtolist
1122        metadata {
1123            kind     {construction}
1124            name     {\currentconstructionmain}
1125          % level    structures.sections.currentlevel()
1126            catcodes \catcodetable
1127        }
1128        references {
1129            internal  \locationcount
1130            order     \locationorder
1131            reference {\currentconstructionreference}
1132            prefix    {\currentconstructionreferenceprefix}
1133          % block     {\currentsectionblock}
1134          % section   structures.sections.currentid(),
1135        }
1136        titledata  {
1137            label     {\detokenize\expandafter{\currentconstructionlabel}}
1138            title     {\detokenize\expandafter{\currentconstructiontitle}}
1139        \ifx\currentconstructionbookmark\currentconstructiontitle \else
1140            bookmark  {\detokenize\expandafter{\currentconstructionbookmark}}
1141        \fi
1142        \ifx\currentconstructionreferencetext\currentconstructiontitle \else
1143            reference {\detokenize\expandafter{\currentconstructionreferencetext}}
1144        \fi
1145        \ifx\currentconstructionlist\currentconstructiontitle \else
1146            list      {\detokenize\expandafter{\currentconstructionlist}}
1147        \fi
1148        }
1149    \ifconditional\c_strc_constructions_number_state
1150        prefixdata {
1151            prefix        {\constructionparameter\c!prefix}
1152            separatorset  {\constructionparameter\c!prefixseparatorset}
1153            conversion    {\constructionparameter\c!prefixconversion}
1154            conversionset {\constructionparameter\c!prefixconversionset}
1155            set           {\constructionparameter\c!prefixset}
1156            segments      {\constructionparameter\c!prefixsegments}
1157            connector     {\constructionparameter\c!prefixconnector}
1158        }
1159        numberdata {
1160            numbers       {\currentconstructionnumber}
1161            separatorset  {\constructionparameter\c!numberseparatorset}
1162            conversion    {\constructionparameter\c!numberconversion}
1163            conversionset {\constructionparameter\c!numberconversionset}
1164            starter       {\constructionparameter\c!numberstarter}
1165            stopper       {\constructionparameter\c!numberstopper}
1166            segments      {\constructionparameter\c!numbersegments}
1167        }
1168    \else
1169       % symbol
1170    \fi
1171        userdata {\detokenize{#1}}
1172     \relax
1173   % \writestatus{constructions}{registering \currentconstruction: \number\scratchcounter}%
1174     \clf_setinternalreference
1175       prefix    {\currentconstructionreferenceprefix}%
1176       reference {\currentconstructionreference}%
1177       internal  \locationcount
1178       view      {\interactionparameter\c!focus}%
1179     \relax
1180     \normalexpanded {%
1181       \endgroup
1182       \edef\noexpand\currentconstructionlistentry  {\the\scratchcounter}%
1183       \edef\noexpand\currentconstructionattribute  {\the\lastdestinationattribute}%
1184       \edef\noexpand\currentconstructionsynchronize{\clf_deferredenhancelist\the\scratchcounter}%
1185     }%
1186   \fi}
1187
1188% This is not so nice, some day I'll just store the number with the entry
1189% and deal with all at the Lua end, but first we need to be able to set
1190% macros.
1191
1192\permanent\protected\def\reinstateconstructionnumberentry#1% was xdef
1193  {\edef\currentconstructionattribute  {\clf_getinternallistreference#1}%
1194   \edef\currentconstructionsynchronize{\clf_deferredenhancelist\number#1}}
1195
1196\permanent\protected\def\reinstatecachedconstructionnumberentry#1% was xdef | #1 = cached index can be different from real
1197  {\edef\currentconstructionattribute  {\clf_getinternalcachedlistreference#1}% destination
1198   \edef\currentconstructionsynchronize{\clf_deferredenhancelist\number#1}}
1199
1200\installstructurelistprocessor{construction}{\usestructurelistprocessor{number+title}}
1201
1202% Helpers:
1203
1204\def\currentconstructionnumber{\constructionparameter\s!counter}
1205
1206\protected\def\strc_constructions_next_indeed #get#tag#level{\strc_counters_increment_sub{#get{#tag}\s!counter}{#level}}
1207\protected\def\strc_constructions_reset_indeed#get#tag#level{\strc_counters_reset_sub    {#get{#tag}\s!counter}{#level}}
1208
1209\protect \endinput
1210