create context-beginner-vi
[cuteobr.git] / context-beginner-vi / t-setup.tex
blob49502301967af706c2eac9f7433207fccf1c58c3
1 %D \module
2 %D [ file=t-setup,
3 %D version=2004.10.31,
4 %D title=\CONTEXT\ User Module,
5 %D subtitle=\CONTEXT\ Setup Definitions,
6 %D author=Hans Hagen,
7 %D date=\currentdate,
8 %D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
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.
14 % module x-set-02 loads the mapping, after that we can say:
16 % texmfstart texexec --int=nl --pdf --global --result=setup-nl x-set-12
18 % \getinterfacecomponent{constant|variable|string}{tag}
20 % 2006-08 Wolfgang Schuster's adaptation of set-11.tex
21 % 2006-11 Vit Zyka adaptation
23 \usemodule[set-02]
25 \unprotect
27 % general
29 \def\setupnumfont {}
30 \def\setuptxtfont {}
31 \def\setupintfont#1{\uppercase{#1}}
32 \def\setupvarfont {\sl}
33 \def\setupoptfont {\sl}
34 \def\setupalwcolor {}
35 \def\setupoptcolor {darkgray}
37 \defineXMLenvironmentsave [cd:content] [list=,state=]
38 {\simpleSETUPargument{content}\blank[\v!halfline]\ignorespaces}
39 {\ignorespaces}
41 \startmessages dutch library: setup
42 title: setup
43 formula: formule
44 number: getal
45 list: lijst
46 dimension: maat
47 mark: markering
48 reference: verwijzing
49 command: commando
50 file: file
51 name: naam
52 identifier: naam
53 text: tekst
54 section: sectie
55 singular: naam enkelvoud
56 plural: naam meervoud
57 matrix: n*m
58 see: zie
59 inherits: erft van
60 1: de karakters < en > zijn globaal actief!
61 2: -- wordt verwerkt
62 3: -- is niet gedefinieerd
63 4: -- wordt nogmaals verwerkt
64 optional: optioneel
65 displaymath: formule
66 index: ingang
67 math: formule
68 nothing: leeg
69 file: file
70 position: positie
71 reference: verwijzing
72 csname: naam
73 destination: bestemming
74 triplet: triplet
75 word: woord
76 content: tekst
77 \stopmessages
79 \startmessages english library: setup
80 title: setup
81 formula: formula
82 number: number
83 list: list
84 dimension: dimension
85 mark: mark
86 reference: reference
87 command: command
88 file: file
89 name: name
90 identifier: identifier
91 text: text
92 section: section
93 singular: singular name
94 plural: plural name
95 matrix: n*m
96 see: see
97 inherits: inherits from
98 1: the characters < and > are globally active!
99 2: -- is processed
100 3: -- is undefined
101 4: -- is processed again
102 optional: optional
103 displaymath: formula
104 index: entry
105 math: formula
106 nothing: empty
107 file: file
108 position: position
109 reference: reference
110 csname: name
111 destination: destination
112 triplet: triplet
113 word: word
114 content: text
115 \stopmessages
117 \startmessages german library: setup
118 title: Setup
119 formula: Formel
120 number: Nummer
121 list: Liste
122 dimension: Dimension
123 mark: Beschriftung
124 reference: Referenz
125 command: Befehl
126 file: Datei
127 name: Name
128 identifier: Name
129 text: Text
130 section: Abschnitt
131 singular: singular
132 plural: plural
133 matrix: n*m
134 see: siehe
135 inherits: inherits from
136 1: Die Zeichen < und > gelten global!
137 2: -- wird verarbeitet
138 3: -- ist undefiniert
139 4: -- ist mehrmals verarbeitet
140 optional: optioneel
141 displaymath: formula
142 index: entry
143 math: formula
144 nothing: empty
145 file: file
146 position: position
147 reference: reference
148 csname: name
149 destination: destination
150 triplet: triplet
151 word: word
152 content: text
153 \stopmessages
155 \startmessages czech library: setup
156 title: nastaven\iacute{}
157 formula: rovnice
158 number: \ccaron\iacute slo
159 list: seznam
160 dimension: dimenze
161 mark: zna\ccaron ka
162 reference: reference
163 command: p\rcaron\iacute kaz
164 file: soubor
165 name: jm\eacute no
166 identifier: identifik\aacute tor
167 text: text
168 section: sekce
169 singular: jm\eacute no v singul\aacute ru
170 plural: jm\eacute no v plur\aacute lu
171 matrix: n*m
172 see: viz
173 inherits: d\ecaron d\iacute{} z
174 1: znaky < a > jsou globaln\ecaron{} aktivn\iacute!
175 2: -- je zpracov\aacute no
176 3: -- je nedefinov\aacute no
177 4: -- je zpracov\aacute no znovu
178 optional: voliteln\eacute{}
179 displaymath: formule
180 index: \uacute daj
181 math: formule
182 nothing: nic
183 file: soubor
184 position: pozice
185 reference: reference
186 csname: jm\eacute no
187 destination: c\iacute l
188 triplet: trojice
189 word: slovo
190 content: text
191 \stopmessages
193 \startmessages italian library: setup
194 title: setup
195 formula: formula
196 number: number
197 list: list
198 dimension: dimension
199 mark: mark
200 reference: reference
201 command: command
202 file: file
203 name: name
204 identifier: name
205 text: text
206 section: section
207 singular: singular name
208 plural: plural name
209 matrix: n*m
210 see: see
211 inherits: inherits from
212 1: the characters < and > are globally active!
213 2: -- is processed
214 3: -- is undefined
215 4: -- is processed again
216 optional: optioneel
217 displaymath: formula
218 index: entry
219 math: formula
220 nothing: empty
221 file: file
222 position: position
223 reference: reference
224 csname: name
225 destination: destination
226 triplet: triplet
227 word: word
228 content: text
229 \stopmessages
231 \startmessages romanian library: setup
232 title: setari
233 formula: formula
234 number: numar
235 list: lista
236 dimension: dimensiune
237 mark: marcaj
238 reference: referinta
239 command: comanda
240 file: fisier
241 name: nume
242 identifier: nume
243 text: text
244 section: sectiune
245 singular: nume singular
246 plural: nume pluram
247 matrix: n*m
248 see: vezi
249 inherits: inherits from
250 1: caracterele < si > sunt active global!
251 2: este procesat --
252 3: -- este nedefinit
253 4: -- este procesat din nou
254 optional: optioneel
255 displaymath: formula
256 index: entry
257 math: formula
258 nothing: empty
259 file: file
260 position: position
261 reference: reference
262 csname: name
263 destination: destination
264 triplet: triplet
265 word: word
266 content: text
267 \stopmessages
269 \startmessages french library: setup
270 title: réglage
271 formula: formule
272 number: numéro
273 list: liste
274 dimension: dimension
275 mark: marquage
276 reference: reference
277 command: commande
278 file: fichier
279 name: nom
280 identifier: identificateur
281 text: texte
282 section: section
283 singular: nom singulier
284 plural: nom pluriel
285 matrix: n*m
286 see: vois
287 inherits: herite de
288 1: les caractères < et > sont globalement actifs !
289 2: -- est traité
290 3: -- n'est pas défini
291 4: -- est traité de nouveau
292 optional: optionel
293 displaymath: formule
294 index: entrée
295 math: formule
296 nothing: vide
297 file: fichier
298 position: position
299 reference: réference
300 csname: nom
301 destination: destination
302 triplet: triplet
303 word: mot
304 content: texte
305 \stopmessages
307 \def\c!setup!internal!#1%
308 {{\dogetmessage{setup}{#1}%
309 \expanded{\setupintfont{\currentmessagetext}}}}
311 \def\c!setup!text!#1%
312 {{\dogetmessage{setup}{#1}%
313 \setupvarfont{\currentmessagetext}}}
315 \def\c!setup!command!#1%
316 {{\setupvarfont{\texescape...#1}}}
318 \def\??stp{@@stp}
320 \defineregister
321 [texmacro]
322 [texmacros]
324 \definesorting
325 [texcommand]
326 [texcommands]
328 \setupsorting
329 [texcommand]
330 [\c!command=\@@stpcommand,
331 \c!criterium=\@@stpcriterium]
333 \definesorting
334 [eachtexcommand]
335 [alltexcommands]
337 \setupsorting
338 [eachtexcommand]
339 [\c!command=\@@stpcommand,
340 \c!criterium=\v!all]
342 \pushmacro\setuptext
344 \defineframedtext
345 [setuptext]
346 [\c!width=\hsize,
347 \c!height=\v!fit,
348 \c!align=\v!right,
349 \c!offset=0.75em]
351 \popmacro\setuptext
353 \newif\ifshortsetup
355 \def\setup {\shortsetupfalse\dosetup}
356 \def\shortsetup{\shortsetuptrue \dosetup}
357 \def\setupsetup{\dodoubleargument\getparameters[\??stp]}
359 %\setupsetup
360 % [\c!before=,
361 % \c!after=,
362 % \c!command=\setup,
363 % \c!criterium=\v!used]
365 \setupsetup
366 [\c!before=,
367 \c!after=,
368 \c!command=\setup,
369 \c!criterium=\v!used,
370 \c!text=]
372 % verwijzing: 0 geen verwijzingen plaatsen / wel genereren
373 % 1 alleen bij zie plaatsen / wel genereren
374 % 2 alle verwijzingen plaatsen / niet genereren
375 % 3 bij zie commando klikken / wel genereren
377 \setupsetup
378 [\c!reference=0]
380 \def\placesetup
381 {\bgroup
382 \getvalue{\e!place\e!listof texcommands}
383 \egroup}
385 \def\placeeverysetup % for fun purposes only
386 {\bgroup
387 \setupsetup[\c!reference=2]%
388 \setupreferencing[\c!state=\v!stop]%
389 \getvalue{\e!place\e!listof alltexcommands}%
390 \egroup}
392 \let\plaatssetup \placesetup
393 \let\plaatselkesetup\placeeverysetup
395 % we use :1 as fallback
397 % \setup{setupinterlinespace}
398 % \setup{setupinterlinespace:1}
399 % \setup{setupinterlinespace:2}
401 \bgroup \catcode`\<=\active
403 %\gdef\dosetup#1%
404 % {\bgroup
405 % \def<<##1>>{##1}%
406 % \edef\ascii{#1}%
407 % \enableXML
408 % \doifelseXMLelement{stp:\ascii}
409 % {\expanded{\flushXMLelement{stp:\ascii}}}
410 % {\doifelseXMLelement{stp:\ascii:1}
411 % {\expanded{\flushXMLelement{stp:\ascii:1}}}
412 % {\convertargument#1\to\ascii
413 % \em unknown setup \quote{\ascii}}}
414 % \egroup}
416 \gdef\dosetup%
417 {\dosingleempty\dodosetup}
419 \gdef\dodosetup[#1]#2%
420 {\bgroup
421 \getparameters[\??stp][#1]
422 \def<<##1>>{##1}% VZ: seems does not operate! (\shortsetup{start<<name>>makeup})
423 \edef\ascii{#2}%
424 % \pagereference[pgref:stp:\ascii]% VZ new
425 \enableXML
426 \doifelseXMLelement{stp:\ascii}
427 {\expanded{\flushXMLelement{stp:\ascii}}%
428 \setbox\scratchbox\hbox{\csname stp:y:\ascii\endcsname}% VZ (for index generation)
430 {\doifelseXMLelement{stp:\ascii:1}
431 {\expanded{\flushXMLelement{stp:\ascii:1}}%
432 \setbox\scratchbox\hbox{\csname stp:y:\ascii:1\endcsname}% VZ
434 {\convertargument#2\to\ascii
435 \em unknown setup \quote{\ascii}}}
436 \egroup}
438 %% VZ 2006-12-04: for putting to index but without printing here
439 \gdef\secretsetup%
440 {\dosingleempty\dosecretsetup}
442 \gdef\dosecretsetup[#1]#2%
443 {\bgroup
444 \getparameters[\??stp][#1]
445 \def<<##1>>{##1}% VZ: seems does not operate! (\shortsetup{start<<name>>makeup})
446 \edef\ascii{#2}%
447 % \pagereference[pgref:stp:\ascii]% VZ new
448 \enableXML
449 \doifelseXMLelement{stp:\ascii}
451 \setbox\scratchbox\hbox{\csname stp:y:\ascii\endcsname}% VZ (for index generation)
453 {\doifelseXMLelement{stp:\ascii:1}
455 \setbox\scratchbox\hbox{\csname stp:y:\ascii:1\endcsname}% VZ
457 {\convertargument#2\to\ascii
458 \em unknown setup \quote{\ascii}}}
459 \egroup}
461 \egroup
463 \defineXMLenvironment [cd:command] [name=,type=,generated=,interactive=,variant=]
465 {\showSETUPrecord}
467 %\def\showSETUPrecord
468 % {\getvalue{\e!start setuptext}
469 % \tttf
470 % \nohyphens
471 % \veryraggedright
472 % \startXMLmapping [one]
473 % \doglobal\newcounter\currentSETUPargument
474 % \global\let\maximumSETUPargument\currentSETUPargument
475 % \bgroup
476 % \doifXMLop{generated}{yes}{\ttsl}%
477 % \doifelseXMLop{type}{environment}
478 % {\tex{\e!start}}{\tex{}}\ignorespaces
479 % \XMLflush{cd:sequence}\ignorespaces
480 % \egroup
481 % \doifelseXMLempty{cd:arguments}
482 % {}
483 % {\bgroup
484 % \setbox0=\hbox{\XMLflush{cd:arguments}}%
485 % \global\let\maximumSETUPargument\currentSETUPargument
486 % \doglobal\newcounter\currentSETUPargument
487 % \ignorespaces\XMLflush{cd:arguments}%
488 % \doif{\XMLpar{cd:command}{type}{}}{environment}
489 % {\hskip.5em\unknown\hskip.5em
490 % \tex{\e!stop}\ignorespaces\XMLflush{cd:sequence}}%
491 % \endgraf
492 % \egroup
493 % %\bgroup
494 % % \tx
495 % % \doif{\XMLpar{cd:command}{interactive}{}}{yes} {\quad INTERACTIVE}%
496 % % \doif{\XMLpar{cd:command}{interactive}{}}{exclusive}{\quad INTERACTIVE ONLY}%
497 % %\egroup
498 % \startXMLmapping [two]
499 % \bgroup
500 % \doglobal\newcounter\currentSETUPargument
501 % \blank[\v!line]
502 % \switchtobodyfont[small] % kan sneller
503 % \ignorespaces\XMLflush{cd:arguments}\endgraf
504 % \egroup
505 % \stopXMLmapping}
506 % \stopXMLmapping
507 % \getvalue{\e!stop setuptext}}
509 \def\showSETUPrecord
510 {\getvalue{\e!start setuptext}
511 \tttf
512 \nohyphens
513 \veryraggedright
514 \startXMLmapping [one]
515 \doglobal\newcounter\currentSETUPargument
516 \global\let\maximumSETUPargument\currentSETUPargument
517 \bgroup
518 \doifXMLop{generated}{yes}
519 \doifnothing
520 {\@@stptext}
521 {\ttsl}%
522 \doifelseXMLop{type}{environment}
523 {\tex{\e!start}}
524 {\tex{}}%
525 \ignorespaces
526 \doiftextelse
527 {\@@stptext}
528 {\@@stptext}
529 {\ignorespaces\XMLflush{cd:sequence}}%
530 \ignorespaces
531 \egroup
532 % \doifelseXMLempty{cd:arguments}% VZ: Why??? it spoils \startA...\stopA
533 % {}
534 {\bgroup
535 \setbox0=\hbox{\XMLflush{cd:arguments}}%
536 \global\let\maximumSETUPargument\currentSETUPargument
537 \doglobal\newcounter\currentSETUPargument
538 \ignorespaces\XMLflush{cd:arguments}%
539 \doif{\XMLpar{cd:command}{type}{}}{environment}
540 {\hskip.5em\unknown\hskip.5em
541 \doifXMLop{generated}{yes} % VZ
542 \doifnothing % VZ
543 {\@@stptext}
544 {\ttsl}
545 {\tex{\e!stop}}\ignorespaces
546 \doiftextelse
547 {\@@stptext}
548 {\@@stptext}
549 {\ignorespaces\XMLflush{cd:sequence}}}%
550 % % VZ new
551 % \hfill
552 % \def\tmp{%
553 % \doiftextelse{\@@stptext}%
554 % {\@@stptext}%
555 % {\ignorespaces\XMLflush{cd:sequence}}%
556 % }%
557 % \at[pgref:stp:\tmp]%
558 % % VZ new end
559 \endgraf
560 \egroup
561 %\bgroup
562 % \tx
563 % \doif{\XMLpar{cd:command}{interactive}{}}{yes} {\quad INTERACTIVE}%
564 % \doif{\XMLpar{cd:command}{interactive}{}}{exclusive}{\quad INTERACTIVE ONLY}%
565 %\egroup
566 \startXMLmapping [two]
567 \bgroup
568 \doglobal\newcounter\currentSETUPargument
569 \blank[\v!line]
570 \switchtobodyfont[small] % kan sneller
571 \ignorespaces\XMLflush{cd:arguments}\endgraf
572 \egroup
573 \stopXMLmapping}
574 \stopXMLmapping
575 \getvalue{\e!stop setuptext}}
577 \defineXMLenvironmentsave [cd:sequence] \ignorespaces \ignorespaces
578 \defineXMLenvironmentsave [cd:arguments] \ignorespaces \ignorespaces
580 % VZ here! + setXvalue!
581 \defineXMLenvironmentsave [cd:define] [name=]
583 {\setxvalue{cd:def:\XMLop{name}}{\XMLflush{cd:define}}}
585 %D This is the first pass; here we generate the top line.
587 \newcounter\currentSETUPargument
588 \def\currentSETUPwidth{0pt}
590 % environmentsave ?
592 \startXMLmapping [one]
594 \defineXMLenvironmentsave [cd:string] [value=]
595 {\getinterfacecomponent{string}{\XMLop{value}}\ignorespaces}
596 {\ignorespaces}
598 \defineXMLenvironmentsave [cd:variable] [value=]
599 % {{\expanded{\setupintfont{\getinterfacecomponent{variable}{\XMLop{value}}}}}\ignorespaces}
600 {{\expanded{\setupvarfont{\getinterfacecomponent{variable}{\XMLop{value}}}}}\ignorespaces}% VZ
601 {\ignorespaces}
603 % moet een standaard type worden
605 \defineXMLenvironmentsave [cd:assignments] [list=,state=]
606 {\showSETUPassignment\ignorespaces} {\ignorespaces}
608 \defineXMLenvironmentsave [cd:keywords] [list=,state=]
609 {\showSETUPkeyword\ignorespaces} {\ignorespaces}
611 \defineXMLenvironmentsave [cd:content] [list=,state=]
612 {\showSETUPcontent\ignorespaces} {\ignorespaces}
614 \defineXMLenvironmentsave [cd:displaymath] [list=,state=]
615 {\showSETUPdisplaymath\ignorespaces} {\ignorespaces}
617 \defineXMLenvironmentsave [cd:index] [list=,state=]
618 {\showSETUPindex\ignorespaces} {\ignorespaces}
620 \defineXMLenvironmentsave [cd:math] [list=,state=]
621 {\showSETUPmath\ignorespaces} {\ignorespaces}
623 \defineXMLenvironmentsave [cd:nothing] [list=,state=]
624 {\showSETUPnothing\ignorespaces} {\ignorespaces}
626 \defineXMLenvironmentsave [cd:file] [list=,state=]
627 {\showSETUPfile\ignorespaces} {\ignorespaces}
629 \defineXMLenvironmentsave [cd:position] [list=,state=]
630 {\showSETUPposition\ignorespaces} {\ignorespaces}
632 \defineXMLenvironmentsave [cd:reference] [list=,state=]
633 {\showSETUPreference\ignorespaces} {\ignorespaces}
635 \defineXMLenvironmentsave [cd:csname] [list=,state=]
636 {\showSETUPcsname\ignorespaces} {\ignorespaces}
638 \defineXMLenvironmentsave [cd:destination] [list=,state=]
639 {\showSETUPdestination\ignorespaces} {\ignorespaces}
641 \defineXMLenvironmentsave [cd:triplet] [list=,state=]
642 {\showSETUPtriplet\ignorespaces} {\ignorespaces}
644 \defineXMLenvironmentsave [cd:word] [list=,state=]
645 {\showSETUPword\ignorespaces} {\ignorespaces}
647 \stopXMLmapping
649 %D This is the second pass; here we generate the table.
651 \startXMLmapping [two]
653 \def\startfirstSETUPcolumn#1%
654 {\bgroup
655 \advance\leftskip 2em
656 \noindent\llap{\hbox to 2em{#1\hss}}}
658 \def\stopfirstSETUPcolumn
659 {\endgraf
660 \egroup}
662 \def\startsecondSETUPcolumn#1#2%
663 {\bgroup
664 \advance\hangindent \currentSETUPwidth
665 \advance\hangindent 2.5em
666 \noindent \hbox to \hangindent{#1\hss\hbox to 2.5em{\hss#2\hss}}}
668 \def\stopsecondSETUPcolumn
669 {\endgraf
670 \egroup}
672 \def\secondSETUPcolumn#1#2%
673 {\startsecondSETUPcolumn{#1}{#2}\stopsecondSETUPcolumn}
675 \def\previousSETUPargument{\currentSETUPargument}
677 %% VZ move above!
678 %\defineXMLenvironmentsave [cd:define] [name=]
679 % {}
680 % {\setevalue{cd:def:\XMLop{name}}{\XMLflush{cd:define}}}
682 \defineXMLsingular [cd:resolve] [name=]
683 {\getvalue{cd:def:\XMLop{name}}}
685 \defineXMLenvironmentsave [cd:assignments]
687 {\xdef\currentSETUPwidth{0pt}%
688 \bgroup
689 \defineXMLenvironment [cd:parameter] [name=]
690 {\setbox0=\hbox{\potentialXMLentity{\getinterfacecomponent{constant}{\XMLop{name}}}}%
691 \ifdim\wd0>\currentSETUPwidth\xdef\currentSETUPwidth{\the\wd0}\fi}%
693 \setbox0=\vbox{\XMLflush{cd:assignments}}%
694 \egroup
695 \startfirstSETUPcolumn{\showSETUPnumber}%
696 \doifelseXMLempty{cd:assignments}
697 {\secondSETUPcolumn{\c!setup!text!{see} \previousSETUPargument}{}}
698 {\ignorespaces
699 \XMLflush{cd:assignments}%
700 \let\previousSETUPargument\currentSETUPargument}%
701 \stopfirstSETUPcolumn
702 \blank[\v!halfline]
703 \ignorespaces}
705 \defineXMLenvironmentsave [cd:keywords]
707 {\startfirstSETUPcolumn{\showSETUPnumber}%
708 \doifelseXMLempty{cd:keywords}
709 {\secondSETUPcolumn{see \previousSETUPargument}{}}
710 {\ignorespaces
711 \XMLflush{cd:keywords}%
712 \let\previousSETUPargument\currentSETUPargument}%
713 \stopfirstSETUPcolumn
714 \blank[\v!halfline]
715 \ignorespaces}
717 \defineXMLenvironment [cd:parameter] [name=]
718 {\startsecondSETUPcolumn{\potentialXMLentity{\getinterfacecomponent{constant}{\XMLop{name}}}}{=}%
719 \ignorespaces}
720 {\stopsecondSETUPcolumn
721 \ignorespaces}
723 \defineXMLenvironmentsave [cd:constant] [type=,default=]
724 {\doifXMLop{default}{yes}{\underbar}%
725 {\potentialXMLentity{\getinterfacecomponent{variable}{\XMLop{type}}}}\quad\ignorespaces}
726 {\ignorespaces}
728 \defineXMLenvironmentsave [cd:variable] [type=]
729 {\potentialXMLentity{\getinterfacecomponent{variable}{\XMLop{type}}}\quad\ignorespaces}
730 {\ignorespaces}
732 \defineXMLenvironmentsave [cd:inherit] [name=]
733 {\secondSETUPcolumn{\c!setup!text!{inherits} \tex{}\getinterfacecomponent{string}{\XMLop{name}}}{}\ignorespaces}
734 {\ignorespaces}
736 \def\simpleSETUPargument#1%
737 {\startfirstSETUPcolumn{\showSETUPnumber}%
738 \c!setup!internal!{#1}%
739 \stopfirstSETUPcolumn}
741 \defineXMLenvironmentsave [cd:content] [list=,state=]
742 {\simpleSETUPargument{content}\blank[\v!halfline]\ignorespaces}
743 {\ignorespaces}
745 \defineXMLenvironmentsave [cd:displaymath] [list=,state=]
746 {\simpleSETUPargument{display math}\blank[\v!halfline]\ignorespaces}
747 {\ignorespaces}
749 \defineXMLenvironmentsave [cd:index] [list=,state=]
750 {\simpleSETUPargument{index}\blank[\v!halfline]\ignorespaces}
751 {\ignorespaces}
753 \defineXMLenvironmentsave [cd:math] [list=,state=]
754 {\simpleSETUPargument{math}\blank[\v!halfline]\ignorespaces}
755 {\ignorespaces}
757 \defineXMLenvironmentsave [cd:nothing] [list=,state=]
758 {\simpleSETUPargument{nothing}\blank[\v!halfline]\ignorespaces}
759 {\ignorespaces}
761 \defineXMLenvironmentsave [cd:file] [list=,state=]
762 {\simpleSETUPargument{file name}\blank[\v!halfline]\ignorespaces}
763 {\ignorespaces}
765 \defineXMLenvironmentsave [cd:position] [list=,state=]
766 {\simpleSETUPargument{position}\blank[\v!halfline]\ignorespaces}
767 {\ignorespaces}
769 \defineXMLenvironmentsave [cd:reference] [list=,state=]
770 {\simpleSETUPargument{reference}\blank[\v!halfline]\ignorespaces}
771 {\ignorespaces}
773 \defineXMLenvironmentsave [cd:csname] [list=,state=]
774 {\simpleSETUPargument{csname}\blank[\v!halfline]\ignorespaces}
775 {\ignorespaces}
777 \defineXMLenvironmentsave [cd:destination] [list=,state=]
778 {\simpleSETUPargument{destination}\blank[\v!halfline]\ignorespaces}
779 {\ignorespaces}
781 \defineXMLenvironmentsave [cd:triplet] [list=,state=]
782 {\simpleSETUPargument{triplet}\blank[\v!halfline]\ignorespaces}
783 {\ignorespaces}
785 \defineXMLenvironmentsave [cd:word] [list=,state=]
786 {\simpleSETUPargument{word}\blank[\v!halfline]\ignorespaces}
787 {\ignorespaces}
789 \stopXMLmapping
791 \defineXMLentity [cd:command] {\c!setup!internal!{command}}
792 \defineXMLentity [cd:dimension] {\c!setup!internal!{dimension}}
793 \defineXMLentity [cd:file] {\c!setup!internal!{file}}
794 \defineXMLentity [cd:name] {\c!setup!internal!{identifier}}
795 \defineXMLentity [cd:character] {\c!setup!internal!{character}}
796 \defineXMLentity [cd:mark] {\c!setup!internal!{mark}}
797 \defineXMLentity [cd:number] {\c!setup!internal!{number}}
798 \defineXMLentity [cd:reference] {\c!setup!internal!{reference}}
799 \defineXMLentity [cd:plural] {\c!setup!internal!{plural}}
800 \defineXMLentity [cd:singular] {\c!setup!internal!{singular}}
801 \defineXMLentity [cd:text] {\c!setup!internal!{text}}
802 \defineXMLentity [cd:formula] {\c!setup!internal!{formula}}
803 \defineXMLentity [cd:file] {\c!setup!internal!{file}}
804 \defineXMLentity [cd:matrix] {\c!setup!internal!{matrix}}
805 \defineXMLentity [cd:list] {\c!setup!internal!{list}}
806 \defineXMLentity [cd:section] {\c!setup!internal!{section}}
808 \defineXMLentity [cd:noargument] {\c!setup!command!{}}
809 \defineXMLentity [cd:oneargument] {\c!setup!command!{\#1}}
810 \defineXMLentity [cd:twoarguments] {\c!setup!command!{\#1\#2}}
811 \defineXMLentity [cd:threearguments] {\c!setup!command!{\#1\#2\#3}}
813 %D Todo:
815 \defineXMLprocess [cd:choice]
817 %D Auxiliary.
819 \setuplabeltext[en][optional=optional] % VZ ??? language or
820 \setuplabeltext[cz][optional=voliteln\eacute{}] % interface
822 \unexpanded\def\showSETUP#1#2%
823 {\bgroup
824 \doglobal\increment\currentSETUPargument
825 \setbox0=\hbox
826 {\doifelseXMLop{list}{yes}{#2}{#1}}%
827 \setbox2=\hbox to \wd0
828 {\hss
829 \raise1ex\hbox
830 {\tx\ifcase\maximumSETUPargument\relax
831 \or*\else\currentSETUPargument
832 \fi}%
833 \hss}%
834 \setbox4=\hbox to \wd0
835 {\hss
836 \lower2ex\hbox
837 \bgroup
838 \txx\doifXMLop{optional}{yes}{\c!setup!internal!{optional}}%
839 % \txx\doifXMLop{optional}{yes}{\labeltext{optional}}% VZ ???
840 \egroup
841 \hss}%
842 \ht2\ht\strutbox
843 \dp4\dp\strutbox
844 \hskip.5em\hsmash{\box0}\hsmash{\box4}\box2%
845 \egroup}
847 \def\showSETUPnumber
848 {\doglobal\increment\currentSETUPargument
849 \hbox to 2em
850 {\ifcase\maximumSETUPargument\relax
851 \or*\else\currentSETUPargument
853 \hss}}
855 \def\showSETUPassignment {\showSETUP
856 {[.\lower.5ex\hbox{=}.]}
857 {[..,.\lower.5ex\hbox{=}.,..]}}
859 \def\showSETUPkeyword {\showSETUP
860 {[...]}
861 {[...,...]}}
863 \def\showSETUPargument {\showSETUP
864 {\leftargument..\rightargument}
865 {\leftargument..,...,..\rightargument}}
867 \def\showSETUPdisplaymath {\showSETUP
868 {\$\$...\$\$}
869 {\$\$...\$\$}}
871 \def\showSETUPindex {\showSETUP
872 {\leftargument...\rightargument}
873 {\leftargument..+...+..\rightargument}}
875 \def\showSETUPmath {\showSETUP
876 {\$...\$}
877 {\$...\$}}
879 \def\showSETUPnothing {\showSETUP
880 {...}
883 \def\showSETUPfile {\showSETUP
884 {~...~}
887 \def\showSETUPposition {\showSETUP
888 {(...)}
889 {(...,...)}}
891 \def\showSETUPreference {\showSETUP
892 {[...]}
893 {[...,...]}}
895 \def\showSETUPcsname {\showSETUP
896 {{\c!setup!command!{}}}
899 \def\showSETUPdestination {\showSETUP
900 {[\leftargument..[ref]\rightargument]}
901 {[..,\leftargument..[ref,..]\rightargument,..]}}
903 \def\showSETUPtriplet {\showSETUP
904 {[x:y:z=]}
905 {[x:y:z=,..]}}
907 \def\showSETUPword {\showSETUP
908 {\leftargument...\rightargument}
909 {\leftargument.. ... ..\rightargument}}
911 \def\showSETUPcontent {\showSETUP
912 {\leftargument...\rightargument}
913 {\leftargument.. ... ..\rightargument}}
915 %\def\c!par!{\c!setup!internal!{endofpar}}
916 %\def\c!repeat!{\c!opt!{{\setupvarfont n}*}}
917 %\showSETUP\def\c!par!{\texescape par}
918 %\showSETUP\def\c!sep!{\texescape\texescape}
919 %\def\c!par!{\addtypespec{delimiter}{par}} % \par
920 %\def\c!sep!{\addtypespec{separator}{backslash}} % \\
921 %\def\c!repeat!{}
922 %\def\c!tex!#1{\addtypespec{command}{#1}\doanother{tex}}
924 \startXMLmapping[zero]
926 %\defineXMLenvironmentsave [cd:command] [name=,type=,generated=,interactive=,variant=]
927 % {}
928 % {\doifelseXMLop{type}{environment}
929 % {\edef\currentSETUPname{start\getinterfacecomponent{string}{\XMLop{name}}}}
930 % {\edef\currentSETUPname{\getinterfacecomponent{string}{\XMLop{name}}}}%
931 % \doifsomething{\XMLop{variant}}
932 % {\edef\currentSETUPname{\currentSETUPname:\XMLop{variant}}}% like setupinterlinespace:1
933 % \doifXMLop{generated}{yes}
934 % {\edef\currentSETUPname{\currentSETUPname*}}%
935 % \doglobal\saveXMLdatainelement{stp:\currentSETUPname}{cd:command}{cd:command}%
936 % \expanded{\eachtexcommand[stp:x:\currentSETUPname]{\currentSETUPname}}%
937 % \expanded{\texcommand [stp:y:\currentSETUPname]{\currentSETUPname}}}
939 \defineXMLenvironmentsave [cd:command] [name=,type=,generated=,interactive=,variant=]
941 {\doifelseXMLop{type}{environment}
942 {\edef\currentSETUPname{\e!start\getinterfacecomponent{string}{\XMLop{name}}}}
943 {\edef\currentSETUPname{\getinterfacecomponent{string}{\XMLop{name}}}}%
944 \doifsomething{\XMLop{variant}}
945 {\edef\currentSETUPname{\currentSETUPname:\XMLop{variant}}}% like setupinterlinespace:1
946 \doifXMLop{generated}{yes}
947 {\edef\currentSETUPname{\currentSETUPname}}%
948 \doglobal\saveXMLdatainelement{stp:\currentSETUPname}{cd:command}{cd:command}%
949 \expanded{\eachtexcommand[stp:x:\currentSETUPname]{\currentSETUPname}}%
950 \expanded{\texcommand [stp:y:\currentSETUPname]{\currentSETUPname}}}
952 \stopXMLmapping
954 \def\loadsetups{\complexorsimple\loadsetups}
956 \def\simpleloadsetups
957 {\doifnotmode{no-setup-main}
958 {\complexloadsetups[cont-en.xml]}}
960 \def\complexloadsetups[#1]%
961 {\doifnotmode{no-setup-all}
962 {\doifsomething{#1}
963 {\startXMLmapping[zero]
964 \expanded{\processXMLfilegrouped{#1}}%
965 \stopXMLmapping}}}
967 \defineXMLsingular [cd:include] [file=]
968 {\complexloadsetups[\XMLop{file}]}
970 \protect \endinput