strc-syn.mkiv /size: 19 Kb    last modification: 2021-10-28 13:50
1%D \module
2%D   [       file=strc-syn,
3%D        version=2008.10.20,
4%D          title=\CONTEXT\ Structure Macros,
5%D       subtitle=Synonyms and Sorting,
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 / Synonyms and Sorting}
15
16\registerctxluafile{strc-syn}{}
17
18%D Although we could nowadays build this on top of regular lists we keep this
19%D more efficient variant around. Eventually we can add some options to lists
20%D that also provide such functionality but at the cost of much more overhead.
21%D
22%D We show a usage of both synonyms and sorts, which are deep down variants of
23%D so called simple lists. A definition looks like this:
24%D
25%D \startbuffer
26%D \definesynonyms
27%D   [myabbreviation]
28%D
29%D \setupsynonyms
30%D   [myabbreviation]
31%D   [headstyle=bold,
32%D    headcolor=darkred,
33%D    synonymstyle=boldslanted,
34%D    synonymcolor=darkblue,
35%D    textstyle=slanted,
36%D    textcolor=darkgreen,
37%D    style=normal,
38%D    color=darkyellow]
39%D
40%D \definesorting
41%D   [mylogo]
42%D
43%D \setupsorting
44%D   [mylogo]
45%D   [style=bold,
46%D    color=darkmagenta]
47%D \stopbuffer
48%D
49%D \typebuffer \getbuffer
50%D
51%D More complex definitions involves commands to call up meanings and such. The
52%D use of the defined commands is as follows: \
53%D
54%D \startbuffer
55%D \myabbreviation [FIRST]  {TheFirst}  {The First Words}
56%D \myabbreviation [SECOND] {TheSecond} {The Second Words}
57%D \myabbreviation [THIRD]  {TheThird}  {The Third Words}
58%D
59%D \mylogo [FOURTH] {TheFourth}
60%D \stopbuffer
61%D
62%D \typebuffer \getbuffer
63%D
64%D By default a synonym is just typeset and flagges as being used, so that in
65%D a list it wil be shows with its meaning. You can however also expand the
66%D meaning automatically at first use:
67%D
68%D \startbuffer
69%D \setupsynonyms[myabbreviation][alternative=first]
70%D
71%D We have \FIRST, \SECOND\ and also \THIRD\ but no \FOURTH.
72%D
73%D We have \FIRST, \SECOND\ and also \THIRD\ but no \FOURTH.
74%D \stopbuffer
75%D
76%D \typebuffer \getbuffer
77%D
78%D We can change the order, as demonstrated in:
79%D
80%D \startbuffer
81%D \resetshownsynonyms[myabbreviation]
82%D
83%D \setupsynonyms[myabbreviation][alternative=last]
84%D
85%D We have \FIRST\ and \THIRD\ or \FOURTH.
86%D
87%D We have \FIRST\ and \THIRD\ or \FOURTH.
88%D \stopbuffer
89%D
90%D \typebuffer \getbuffer
91%D
92%D A list is called up with:
93%D
94%D \startbuffer
95%D \placelistofsynonyms[myabbreviation]
96%D
97%D \placelistofsorts[mylogo]
98%D \stopbuffer
99%D
100%D \typebuffer \getbuffer
101%D
102%D The lists are constructions (like descriptions are) and can be set up
103%D likewise.
104
105% todo: add 'define only' option to descriptions, then add sorting (also based on key)
106% and call to definition -> replaces this module
107
108\unprotect
109
110% split but common in lua
111
112\def\preprocessexpansion#1#2#3#4% do this at the lua end if still needed
113  {\ifx#1\s!xml
114     \xmlstartraw
115       \xdef#2{#4}%
116     \xmlstopraw
117     \glet#3\s!xml
118   \else
119     \ifx#1\v!yes
120       \xdef#2{#4}%
121     \else
122       \xdef#2{\detokenize{#4}}%
123     \fi
124     \glet#3\s!tex
125   \fi}
126
127%D We now use a simple list variant:
128
129\installcorenamespace {simplelist}
130
131\installcommandhandler \??simplelist {simplelist} \??simplelist
132
133\let\setupsimplelists\setupsimplelist
134
135\setupsimplelists[%
136    %c!title=,
137    %c!text=,
138    %
139    %c!style=,
140    %c!color=,
141    %c!command=,
142    %c!align=,
143    %
144    %c!headstyle=,
145    %c!headcolor=,
146    %c!headalign=,
147    %
148    %c!titlestyle=,
149    %c!titlecolor=,
150    %c!titlecommand=,
151    %c!titleleft=,
152    %c!titleright=,
153    %
154    %c!closesymbol=,
155    %c!closecommand=,
156    %
157    \c!alternative=\v!left,
158    \c!display=\v!yes,
159    \c!width=7\emwidth,
160    \c!distance=\emwidth,
161    \c!titledistance=.5\emwidth,
162    %c!hang=,
163    %c!sample=,
164    \c!margin=\v!no,
165    \c!before=\startpacked,
166    \c!inbetween=\blank,
167    \c!after=\stoppacked,
168    %c!indentnext=,
169    %c!indenting=,
170    %
171    \c!expansion=\v!no,
172    %c!xmlsetup=,
173    %s!catcodes=,
174    \s!language=\currentmainlanguage,
175]
176
177\appendtoks
178    \setfalse\c_strc_constructions_define_commands
179    \ifx\currentsimplelistparent\empty
180        \defineconstruction[\currentsimplelist][\s!handler=\v!simplelist,\c!level=1]%
181    \else
182        \defineconstruction[\currentsimplelist][\currentsimplelistparent][\s!handler=\v!simplelist,\c!level=1]%
183    \fi
184    \settrue\c_strc_constructions_define_commands
185\to \everydefinesimplelist
186
187\setuvalue{\??constructioninitializer\v!simplelist}%
188  {\let\currentsimplelist               \currentconstruction
189   \let\constructionparameter           \simplelistparameter
190   \let\constructionnamespace           \??simplelist
191   \let\detokenizedconstructionparameter\detokenizedsimplelistparameter
192   \let\letconstructionparameter        \letsimplelistparameter
193   \let\useconstructionstyleandcolor    \usesimpleliststyleandcolor
194   \let\setupcurrentconstruction        \setupcurrentsimplelist}
195
196\setuvalue{\??constructionfinalizer\v!simplelist}%
197  {}
198
199\setuvalue{\??constructiontexthandler\v!simplelist}%
200  {\begingroup
201   \useconstructionstyleandcolor\c!headstyle\c!headcolor
202   \the\everyconstruction
203   \constructionparameter\c!headcommand
204     {\strut
205      \currentsimplelistentry}%
206   \endgroup}
207
208% And we build on top of this.
209
210\ifdefined\dotagsynonym \else \let\dotagsynonym\relax \fi
211\ifdefined\dotagsorting \else \let\dotagsorting\relax \fi
212
213\definesimplelist
214  [\v!synonym]
215  [\c!state=\v!start,
216  %\c!synonymstyle=,
217  %\c!textstyle=,
218  %\c!headstyle=,
219  %\c!headcolor=,
220  %\c!criterium=,
221   \c!location=\v!left,
222   \c!width=5\emwidth,
223   \c!distance=\zeropoint,
224  %\c!sample=,
225  %\c!hang=,
226  %\c!align=,
227  %\c!before=,
228  %\c!inbetween=,
229  %\c!after=,
230   \c!indentnext=\v!no,
231  %\c!expansion=,
232   \c!method=]
233
234\let\setupsynonyms\setupsimplelist
235
236\unexpanded\def\definesynonyms
237  {\doquadrupleempty\strc_synonyms_define}
238
239\def\strc_synonyms_define[#1][#2][#3][#4]% name plural \meaning \use
240  {\edef\currentsynonym{#1}%
241   \iffourthargument
242     \unexpanded\def#4##1{\strc_synonyms_insert{#1}{##1}}% name tag
243     \ifthirdargument
244       \unexpanded\def#3##1{\strc_synonyms_insert_meaning{#1}{##1}}% \meaning
245     \fi
246     \setuvalue{#1}{\definesynonym[\v!no][#1]}% \name
247   \else
248     \ifthirdargument
249       \unexpanded\def#3##1{\strc_synonyms_insert_meaning{#1}{##1}}% \meaning
250     \fi
251     \setuvalue{#1}{\definesynonym[\v!yes][#1]}% \name
252   \fi
253   %
254%  \checksynonymparent
255%  \setupcurrentsynonym[\s!single={#1},\s!multi={#2}]%
256   \setfalse\c_strc_constructions_define_commands
257   \definesimplelist
258     [\currentsynonym]%
259     [\v!sorting]
260     [\s!single={#1},%
261      \s!multi={#2}]%
262   \settrue\c_strc_constructions_define_commands
263   %
264   \presetheadtext[#2=\Word{#2}]% changes the \if...argument
265   %
266   \setvalue{\e!setup #2\e!endsetup}{\setupsynonyms[#1]}% obsolete definition
267   \setvalue{\e!place   \e!listof#2}{\placelistofsynonyms[#1]}% accepts extra argument
268   \setvalue{\e!complete\e!listof#2}{\completelistofsynonyms[#1]}}
269
270\unexpanded\def\definesynonym
271  {\dotripleempty\strc_synonyms_define_entry}
272
273\def\strc_synonyms_define_entry[#1][#2][#3]#4#5%
274  {\begingroup
275   \edef\currentsynonym{#2}%
276   \edef\currentsynonymtag{#3}%
277   \let\currentsimplelist\currentsynonym
278   \ifx\currentsynonymtag\empty
279     \edef\currentsynonymtag{#4}%
280   \fi
281   \ifx\currentsynonymtag\empty
282     % todo: error message
283   \else
284     % this is not that efficient, esp when we load a big list
285     \edef\currentsynonymexpansion{\simplelistparameter\c!expansion}%
286     \preprocessexpansion\currentsynonymexpansion\m_synonyms_text   \currentsynonymcoding{#4}%
287     \preprocessexpansion\currentsynonymexpansion\m_synonyms_meaning\currentsynonymcoding{#5}%
288     %
289     \clf_registersynonym
290        {\currentsynonym}%
291        {synonym}%
292        {%
293            metadata {%
294                catcodes \catcodetable
295                coding   {\currentsynonymcoding}%
296            \ifx\currentsynonymcoding\s!xml
297                xmlroot  {\xmldocument}%
298            \fi
299            }%
300            definition {%
301                tag     {\currentsynonymtag}%
302                synonym {\m_synonyms_text}%
303                meaning {\m_synonyms_meaning}%
304              % used    false
305            }%
306        }%
307     \relax
308     \doif{#1}\v!yes{\setuxvalue\currentsynonymtag{\strc_synonyms_insert{\currentsynonym}{\currentsynonymtag}}}%
309   \fi
310   \endgroup}
311
312\unexpanded\def\registersynonym
313  {\dodoubleargument\strc_synonyms_register}
314
315\def\strc_synonyms_register[#1][#2]%
316  {\clf_registerusedsynonym{#1}{#2}}
317
318\unexpanded\def\currentsynonymname         {\clf_synonymname         {\currentsimplelist}{\currentsynonymtag}}
319\unexpanded\def\currentsynonymmeaning      {\clf_synonymmeaning      {\currentsimplelist}{\currentsynonymtag}}
320\unexpanded\def\doifelsecurrentsynonymused {\clf_doifelsesynonymused {\currentsimplelist}{\currentsynonymtag}}
321\unexpanded\def\doifelsecurrentsynonymshown{\clf_doifelsesynonymshown{\currentsimplelist}{\currentsynonymtag}}
322\unexpanded\def\resetusedsynonyms      [#1]{\clf_resetusedsynonyms   {#1}}
323\unexpanded\def\resetshownsynonyms     [#1]{\clf_resetshownsynonyms  {#1}}
324
325\let\rawsynonymname   \clf_synonymname
326\let\rawsynonymmeaning\clf_synonymmeaning
327
328\installcorenamespace{simplelistalternative} % specific ways of rendering a list
329\installcorenamespace{simplelistrenderings}  % a namespace for setups (rather local)
330
331\installcommandhandler \??simplelistalternative {simplelistalternative} \??simplelistalternative
332
333\setupsimplelist
334  [\v!synonym]
335  [\c!alternative=\v!normal]
336
337\unexpanded\def\strc_synonyms_insert_meaning#1#2% name tag
338  {\dontleavehmode % otherwise we don't get it right at the beginning of a par
339   \begingroup
340   \def\currentsimplelist{#1}%
341   \def\currentsynonymtag{#2}%
342   \fastsetup{\??simplelistrenderings::\v!text}%
343   \endgroup}
344
345\unexpanded\def\strc_synonyms_insert#1#2% name tag
346  {\dontleavehmode % otherwise we don't get it right at the beginning of a par
347   \begingroup
348   \edef\currentsimplelist{#1}%
349   \let \currentsynonym\currentsimplelist % for a while
350   \def \currentsynonymtag{#2}%
351   \edef\currentsimplelistalternative{\simplelistparameter\c!alternative}%
352   \doifnotcommandhandler\??simplelistalternative\currentsimplelistalternative
353     {\let\currentsimplelistalternative\v!normal}%
354   \fastsetup{\??simplelistrenderings:\v!synonym:\currentsimplelistalternative}%
355   \normalexpanded{\endgroup\simplelistparameter\c!next}}
356
357% \setupsimplelistalternative
358%   [\c!command=\directsimplelistparameter\c!command]
359
360\definesimplelistalternative
361  [\v!normal]
362  [\c!inbetween=\space,
363   \c!left=(,
364   \c!right=)]
365
366\definesimplelistalternative
367  [\v!first]
368  [\v!normal]
369
370\definesimplelistalternative
371  [\v!last]
372  [\v!normal]
373
374\startsetups[\??simplelistrenderings::\v!synonym]
375    \begingroup
376    \dostarttaggedchained\t!synonym\currentsynonym\??simplelist
377    \dotagsynonym
378    \usesimpleliststyleandcolor\c!synonymstyle\c!synonymcolor
379    \simplelistparameter\c!synonymcommand{\currentsynonymname}%
380    \dostoptagged
381    \endgroup
382\stopsetups
383
384\startsetups[\??simplelistrenderings::\v!text]
385    \begingroup
386    \usehyphensparameter\simplelistparameter
387    \usesimpleliststyleandcolor\c!textstyle\c!textcolor
388    \simplelistparameter\c!textcommand{\currentsynonymmeaning}%
389    \endgroup
390\stopsetups
391
392\startsetups[\??simplelistrenderings:\v!synonym:\v!normal]
393    \fastsetup{\??simplelistrenderings::\v!synonym}
394\stopsetups
395
396\startsetups[\??simplelistrenderings:\v!synonym:\v!first]
397    \fastsetup{\??simplelistrenderings::\v!synonym}
398    \doifelsecurrentsynonymshown \donothing {
399        \simplelistalternativeparameter\c!inbetween
400        \simplelistalternativeparameter\c!left
401        \fastsetup{\??simplelistrenderings::\v!text}
402        \simplelistalternativeparameter\c!right
403    }
404\stopsetups
405
406\startsetups[\??simplelistrenderings:\v!synonym:\v!last]
407    \doifelsecurrentsynonymshown {
408        \fastsetup{\??simplelistrenderings::\v!synonym}
409    } {
410        \fastsetup{\??simplelistrenderings::\v!text}
411        \simplelistalternativeparameter\c!inbetween
412        \simplelistalternativeparameter\c!left
413        \fastsetup{\??simplelistrenderings::\v!synonym}
414        \simplelistalternativeparameter\c!right
415    }
416\stopsetups
417
418\unexpanded\def\placelistofsynonyms
419  {\dodoubleempty\strc_synonyms_place_list}
420
421\def\strc_synonyms_place_list[#1][#2]%
422  {\begingroup
423   \edef\currentsimplelist{#1}%
424   \doifelsecommandhandler\??simplelist\currentsimplelist
425     {\strc_constructions_initialize{#1}%
426      \setupcurrentsimplelist[#2]%
427      \let\synonymentry\strc_synonym_normal
428      % so we can hook tabulate into before and after
429      \normalexpanded{\simplelistparameter\c!before
430        \noexpand\clf_processsynonyms
431           {#1}%
432           {%
433               criterium {\simplelistparameter\c!criterium}%
434               language  {\simplelistparameter\s!language}%
435               method    {\simplelistparameter\c!method}%
436           }%
437        \relax
438      \simplelistparameter\c!after}%
439      \relax}%
440     {}% todo: message that invalid
441   \endgroup}
442
443\def\completelistofsynonyms
444  {\dodoubleempty\strc_synonyms_complete_list}
445
446\def\strc_synonyms_complete_list[#1][#2]%
447  {\begingroup
448   \edef\currentsimplelist{#1}%
449   \doifelsecommandhandler\??simplelist\currentsimplelist
450     {\normalexpanded{\startnamedsection[\v!chapter][\c!title={\headtext{\simplelistparameter\s!multi}},\c!reference=#1]}%
451        \strc_synonyms_place_list[#1][#2]%
452        \page
453      \stopnamedsection}%
454     {}% todo: message that invalid
455   \endgroup}
456
457\unexpanded\def\strc_synonym_normal#1#2#3#4%
458  {\begingroup
459   \def\currentsimplelistentry{#3}%
460   \csname\??constructionstarthandler\v!construction\endcsname
461   #4%
462   \csname\??constructionstophandler\v!construction\endcsname
463   \endgroup}
464
465%D Sorting (a simplified version of synonym).
466
467\definesimplelist
468  [\v!sorting]
469  [\c!state=\v!start,
470  %\c!command=, % we test for defined !
471  %\c!criterium=,
472  %\c!style=,
473   \c!before=\startpacked,
474   \c!after=\stoppacked,
475  %\c!expansion=,
476   \c!method=]
477
478\let\setupsorting\setupsimplelist
479
480\unexpanded\def\definesorting
481  {\dotripleempty\strc_sorting_define}
482
483% if #3=\relax or \v!none, then no command but still protected
484
485\def\strc_sorting_define[#1][#2][#3]%
486  {\edef\currentsorting{#1}%
487   \ifthirdargument
488     \doifnot{#3}\v!none
489       {\ifx#3\relax \else
490          \unexpanded\def#3##1{\strc_sorting_insert{#1}{##1}}%
491        \fi}%
492     \setuvalue{#1}{\definesort[\v!no][#1]}%
493   \else
494     \setuvalue{#1}{\definesort[\v!yes][#1]}%
495   \fi
496   \setfalse\c_strc_constructions_define_commands
497   \definesimplelist
498     [\currentsorting]%
499     [\v!sorting]
500     [\s!single={#1},%
501      \s!multi={#2}]%
502   \settrue\c_strc_constructions_define_commands
503   %
504   \presetheadtext[#2=\Word{#2}]% after \ifthirdargument -)
505   %
506   \setvalue{\e!setup #2\e!endsetup}{\setupsorting[#1]}% obsolete definition
507   \setvalue{\e!place   \e!listof#2}{\placelistofsorts[#1]}%
508   \setvalue{\e!complete\e!listof#2}{\completelistofsorts[#1]}}
509
510\unexpanded\def\definesort
511  {\dotripleempty\strc_sorting_define_entry}
512
513\def\strc_sorting_define_entry[#1][#2][#3]#4%
514  {\begingroup
515   \edef\currentsorting{#2}%
516   \edef\currentsortingtag{#3}%
517   \let\currentsimplelist\currentsimplelist
518   \ifx\currentsortingtag\empty
519     \edef\currentsortingtag{#4}%
520   \fi
521   \ifx\currentsortingtag\empty
522     % todo: error message
523   \else
524     \edef\currentsortingexpansion{\simplelistparameter\c!expansion}%
525     \preprocessexpansion\currentsortingexpansion\currentsortingtext\currentsortingcoding{#4}%
526     \clf_registersynonym
527        {\currentsorting}%
528        {sorting}%
529        {%
530            metadata {%
531                catcodes \catcodetable
532                coding   {\currentsortingcoding}%
533            \ifx\currentsortingcoding\s!xml
534                xmlroot  {\xmldocument}%
535            \fi
536            }%
537            definition {%
538                tag     {\currentsortingtag}%
539                synonym {\currentsortingtext}%
540              % used    false
541            }%
542        }%
543     \relax
544     \doif{#1}\v!yes{\setuxvalue\currentsortingtag{\strc_sorting_insert{\currentsorting}{\currentsortingtag}}}%
545   \fi
546   \endgroup}
547
548\unexpanded\def\currentsortingname         {\clf_synonymname         {\currentsimplelist}{\currentsortingtag}}
549\unexpanded\def\doifelsecurrentsortingused {\clf_doifelsesynonymused {\currentsimplelist}{\currentsortingtag}}
550\unexpanded\def\resetusedsortings      [#1]{\clf_resetusedsynonyms   {#1}}
551
552\setupsimplelist
553  [\v!sorting]
554  [\c!alternative=\v!normal]
555
556\unexpanded\def\strc_sorting_insert#1#2% name tag
557  {\dontleavehmode % otherwise we don't get it right at the beginning of a par
558   \begingroup
559   % no kap currently, of .. we need to map cap onto WORD
560   \edef\currentsorting{#1}%
561   \def \currentsortingtag{#2}%
562   \let \currentsimplelist\currentsorting
563   \edef\currentsimplelistalternative{\simplelistparameter\c!alternative}%
564   \doifnotcommandhandler\??simplelistalternative\currentsimplelistalternative
565     {\let\currentsimplelistalternative\v!normal}%
566   \fastsetup{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}%
567   \normalexpanded{\endgroup\simplelistparameter\c!next}}
568
569% or:
570%
571% \doifelsesetups{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}
572%    {\fastsetup{\??simplelistrenderings:\v!sorting:\currentsimplelistalternative}}
573%    {\fastsetup{\??simplelistrenderings:\v!sorting:\v!normal}}
574
575\startsetups [\??simplelistrenderings:\v!sorting:\v!normal]
576   \fastsetup{\??simplelistrenderings::\v!sorting}%
577\stopsetups
578
579\startsetups [\??simplelistrenderings::\v!sorting]
580    \begingroup
581    \dostarttaggedchained\t!sorting\currentsorting\??simplelist
582    \dotagsorting
583    \usesimpleliststyleandcolor\c!style\c!color
584    \currentsortingname
585    \dostoptagged
586    \endgroup
587\stopsetups
588
589\unexpanded\def\registersort
590  {\dodoubleargument\strc_sorting_register}
591
592\def\strc_sorting_register[#1][#2]%
593  {\clf_registerusedsynonym{#1}{#2}}
594
595% before after
596%
597% maybe just 'commandset' and then combine
598
599\unexpanded\def\placelistofsorts
600  {\dodoubleempty\strc_sorting_place_list}
601
602
603\def\strc_sorting_place_list[#1][#2]%
604  {\begingroup
605   \edef\currentsimplelist{#1}%
606   \strc_constructions_initialize{#1}%
607   \setupcurrentsimplelist[#2]%
608   \edef\p_simplelist_command{\simplelistparameter\c!command}%
609   \ifx\p_simplelist_command\empty
610     \let\synonymentry\strc_sorting_normal
611   \else
612     \let\synonymentry\strc_sorting_command
613   \fi
614   % so we can hook tabulate into before and after
615   \normalexpanded{\simplelistparameter\c!before
616     \noexpand\clf_processsynonyms
617        {#1}%
618        {%
619            criterium {\simplelistparameter\c!criterium}%
620            language  {\simplelistparameter\s!language}%
621            method    {\simplelistparameter\c!method}%
622        }%
623     \relax
624   \simplelistparameter\c!after}%
625   \endgroup}
626
627\unexpanded\def\completelistofsorts
628  {\dodoubleempty\strc_sorting_complete_list}
629
630\def\strc_sorting_complete_list[#1][#2]%
631  {\begingroup
632   \edef\currentsimplelist{#1}%
633   \normalexpanded{\startnamedsection[\v!chapter][\c!title={\headtext{\simplelistparameter\s!multi}},\c!reference=#1]}%
634   \strc_sorting_place_list[#1][#2]%
635   \page
636   \stopnamedsection
637   \endgroup}
638
639\def\strc_sorting_command#1#2#3#4% #4 is meaning but empty here
640  {\p_simplelist_command{#1}{#2}{#3}}
641
642\def\strc_sorting_normal#1#2#3#4% #4 is meaning but empty here
643  {\begingroup
644   \usesimpleliststyleandcolor\c!style\c!color
645   #3%
646   \endgroup
647   \par}
648
649%D Presets.
650
651% To be considered:
652%
653% \setupsimplelist
654%   [\v!sorting]
655%   [\c!headstyle=\simplelistparameter\c!synonymstyle,
656%    \c!headcolor=\simplelistparameter\c!synonymcolor,
657%    \c!style=\simplelistparameter\c!textstyle,
658%    \c!color=\simplelistparameter\c!textcolor]
659
660\definesynonyms
661  [\v!abbreviation]
662  [\v!abbreviations]
663  [\infull]
664
665\setupsynonyms
666  [\v!abbreviation]
667  [\c!hyphens=\v!no, % new, not yet in setup definitions
668   \c!textstyle=\v!capital]
669
670\definesorting
671  [\v!logo]
672  [\v!logos]
673% [\logogram] % no
674
675\protect \endinput
676