summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/x-set-11.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/x-set-11.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/x-set-11.mkiv305
1 files changed, 289 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/context/base/x-set-11.mkiv b/Master/texmf-dist/tex/context/base/x-set-11.mkiv
index 784df311389..ceba34f3d54 100644
--- a/Master/texmf-dist/tex/context/base/x-set-11.mkiv
+++ b/Master/texmf-dist/tex/context/base/x-set-11.mkiv
@@ -12,6 +12,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% we can make this module a bit cleaner using more recent features
+% like sorting the xml directly
+
% \startluacode
% collectgarbage("stop")
% function collectgarbage() return 0 end
@@ -26,24 +29,288 @@
% \setup{setupinterlinespace:1}
% \setup{setupinterlinespace:2}
%
-% cd:include -> @file
+% cd:include -> filename
% cd:choice
%
% register, interaction
-\usemodule[set-99] % interface messages
+\startmessages dutch library: setup
+ title: setup
+ formula: formule
+ number: getal
+ list: lijst
+ dimension: maat
+ mark: markering
+ reference: verwijzing
+ command: commando
+ file: file
+ name: naam
+ identifier: naam
+ text: tekst
+ section: sectie
+ singular: naam enkelvoud
+ plural: naam meervoud
+ matrix: n*m
+ see: zie
+ inherits: erft van
+ 1: de karakters < en > zijn globaal actief!
+ 2: -- wordt verwerkt
+ 3: -- is niet gedefinieerd
+ 4: -- wordt nogmaals verwerkt
+ optional: optioneel
+ displaymath: formule
+ index: ingang
+ math: formule
+ nothing: leeg
+ file: file
+ position: positie
+ reference: verwijzing
+ csname: naam
+ destination: bestemming
+ triplet: triplet
+ word: woord
+ content: tekst
+\stopmessages
+
+\startmessages english library: setup
+ title: setup
+ formula: formula
+ number: number
+ list: list
+ dimension: dimension
+ mark: mark
+ reference: reference
+ command: command
+ file: file
+ name: name
+ identifier: identifier
+ text: text
+ section: section
+ singular: singular name
+ plural: plural name
+ matrix: n*m
+ see: see
+ inherits: inherits from
+ 1: the characters < and > are globally active!
+ 2: -- is processed
+ 3: -- is undefined
+ 4: -- is processed again
+ optional: optional
+ displaymath: formula
+ index: entry
+ math: formula
+ nothing: empty
+ file: file
+ position: position
+ reference: reference
+ csname: name
+ destination: destination
+ triplet: triplet
+ word: word
+ content: text
+\stopmessages
+
+\startmessages german library: setup
+ title: Setup
+ formula: Formel
+ number: Nummer
+ list: Liste
+ dimension: Dimension
+ mark: Beschriftung
+ reference: Referenz
+ command: Befehl
+ file: Datei
+ name: Name
+ identifier: Name
+ text: Text
+ section: Abschnitt
+ singular: singular
+ plural: plural
+ matrix: n*m
+ see: siehe
+ inherits: inherits from
+ 1: Die Zeichen < und > gelten global!
+ 2: -- wird verarbeitet
+ 3: -- ist undefiniert
+ 4: -- ist mehrmals verarbeitet
+ optional: optioneel
+ displaymath: formula
+ index: entry
+ math: formula
+ nothing: empty
+ file: file
+ position: position
+ reference: reference
+ csname: name
+ destination: destination
+ triplet: triplet
+ word: word
+ content: text
+\stopmessages
+
+\startmessages czech library: setup
+ title: setup
+ formula: rovnice
+ number: cislo
+ list: seznam
+ dimension: dimenze
+ mark: znacka
+ reference: reference
+ command: prikaz
+ file: soubor
+ name: jmeno
+ identifier: jmeno
+ text: text
+ section: sekce
+ singular: jmeno v singularu
+ plural: jmeno v pluralu
+ matrix: n*m
+ see: viz
+ inherits: inherits from
+ 1: znaky < a > jsou globalne aktivni!
+ 2: -- je zpracovano
+ 3: -- je nedefinovano
+ 4: -- je zpracovano znovu
+ optional: optioneel
+ displaymath: formula
+ index: entry
+ math: formula
+ nothing: empty
+ file: file
+ position: position
+ reference: reference
+ csname: name
+ destination: destination
+ triplet: triplet
+ word: word
+ content: text
+\stopmessages
+
+\startmessages italian library: setup
+ title: setup
+ formula: formula
+ number: number
+ list: list
+ dimension: dimension
+ mark: mark
+ reference: reference
+ command: command
+ file: file
+ name: name
+ identifier: name
+ text: text
+ section: section
+ singular: singular name
+ plural: plural name
+ matrix: n*m
+ see: see
+ inherits: inherits from
+ 1: the characters < and > are globally active!
+ 2: -- is processed
+ 3: -- is undefined
+ 4: -- is processed again
+ optional: optioneel
+ displaymath: formula
+ index: entry
+ math: formula
+ nothing: empty
+ file: file
+ position: position
+ reference: reference
+ csname: name
+ destination: destination
+ triplet: triplet
+ word: word
+ content: text
+\stopmessages
+
+\startmessages romanian library: setup
+ title: setari
+ formula: formula
+ number: numar
+ list: lista
+ dimension: dimensiune
+ mark: marcaj
+ reference: referinta
+ command: comanda
+ file: fisier
+ name: nume
+ identifier: nume
+ text: text
+ section: sectiune
+ singular: nume singular
+ plural: nume pluram
+ matrix: n*m
+ see: vezi
+ inherits: inherits from
+ 1: caracterele < si > sunt active global!
+ 2: este procesat --
+ 3: -- este nedefinit
+ 4: -- este procesat din nou
+ optional: optioneel
+ displaymath: formula
+ index: entry
+ math: formula
+ nothing: empty
+ file: file
+ position: position
+ reference: reference
+ csname: name
+ destination: destination
+ triplet: triplet
+ word: word
+ content: text
+\stopmessages
+
+\startmessages french library: setup
+ title: réglage
+ formula: formule
+ number: numéro
+ list: liste
+ dimension: dimension
+ mark: marquage
+ reference: reference
+ command: commande
+ file: fichier
+ name: nom
+ identifier: identificateur
+ text: texte
+ section: section
+ singular: nom singulier
+ plural: nom pluriel
+ matrix: n*m
+ see: vois
+ inherits: herite de
+ 1: les caractères < et > sont globalement actifs !
+ 2: -- est traité
+ 3: -- n'est pas défini
+ 4: -- est traité de nouveau
+ optional: optionel
+ displaymath: formule
+ index: entrée
+ math: formule
+ nothing: vide
+ file: fichier
+ position: position
+ reference: réference
+ csname: nom
+ destination: destination
+ triplet: triplet
+ word: mot
+ content: texte
+\stopmessages
\unprotect
% general
-\unexpanded\def\setupnumfont {}
-\unexpanded\def\setuptxtfont {}
-\unexpanded\def\setupintfont {\WORD}
-\unexpanded\def\setupvarfont {\sl}
-\unexpanded\def\setupoptfont {\sl}
-\unexpanded\def\setupalwcolor {}
-\unexpanded\def\setupoptcolor {darkgray}
+\unexpanded\def\setupnumfont {}
+\unexpanded\def\setuptxtfont {}
+\unexpanded\def\setupintfont {\WORD}
+\unexpanded\def\setupvarfont {\sl}
+\unexpanded\def\setupoptfont {\sl}
+\unexpanded\def\setupalwcolor{}
+\unexpanded\def\setupoptcolor{darkgray}
\def\c!setup!definereserved#1#2%
{\setvalue{c!setup!:r:#1}{#2}}
@@ -97,7 +364,7 @@
\let\currentSETUPfullname\s!unknown
\startxmlsetups xml:setups:assemblename
- \doifelse {\xmlatt{#1}{environment}} {yes} {
+ \doifelse {\xmlatt{#1}{type}} {environment} {
\let\currentSETUPprefix\e!start
} {
\let\currentSETUPprefix\empty
@@ -127,6 +394,7 @@
\stopxmlsetups
\startxmlsetups xml:setups:basics
+ \xmlinclude{#1}{include}{filename}%
\xmlsetsetup {#1} {
sequence|string|variable|assignments|keywords|content|displaymath|index|math|
nothing|file|position|reference|csname|destination|triplet|word|
@@ -148,13 +416,13 @@
{\doonlyonce{setups:#1}
{\doglobal\prependtocommalist{setups:#1}\loadedsetups % last overloads first
\xmlloadonly{setups:#1}{#1}{setups}%
- \xmlfilter{setups:#1}{/interface/command/command(xml:setups:register)}}}} % qualified path saves > 50% runtime
+ \xmlfilter{setups:#1}{interface/command/command(xml:setups:register)}}}} % qualified path saves > 50% runtime
\newif\ifshortsetup
\unexpanded\def\setup {\shortsetupfalse\doshowsetup}
-\def\showsetup {\shortsetupfalse\doshowsetup}
-\def\shortsetup{\shortsetuptrue \doshowsetup}
+\unexpanded\def\showsetup {\shortsetupfalse\doshowsetup}
+\unexpanded\def\shortsetup{\shortsetuptrue \doshowsetup}
\unexpanded\def\setupsetup{\dodoubleargument\getparameters[\??stp]}
%unexpanded\def\showsetupinlist#1#2#3{\shortsetupfalse\showsetupindeed{#3}\par}
@@ -176,8 +444,11 @@
{\registersort[texcommand][stp:x:#1]%
\showsetupindeed{#1}}
+% \def\showsetupindeed#1%
+% {\xmlfilterlist{\loadedsetups}{interface/command[@name='#1']/command(xml:setups:typeset)}}
+
\def\showsetupindeed#1%
- {\xmlfilterlist{\loadedsetups}{/interface/command[@name='#1']/command(xml:setups:typeset)}}
+ {\xmlfilterlist{\loadedsetups}{interface/command['#1' == (@type=='environment' and 'start' or '') .. @name]/command(xml:setups:typeset)}}
\unexpanded\def\placesetup {\placelistofsorts[texcommand][\c!criterium=\v!used]}
\unexpanded\def\placeallsetups{\placelistofsorts[texcommand][\c!criterium=\v!all ]}
@@ -205,6 +476,7 @@
\doglobal\newcounter\currentSETUPargument
\xdef\maximumSETUPargument{\xmlcount{#1}{/arguments/*}}
\bgroup
+ \enablemode[setups-pass-one]%
\doif {\xmlatt{#1}{generated}} {yes} {
\ttsl
}
@@ -226,12 +498,13 @@
}
\doif {\xmlatt{#1}{type}} {environment} {
\bgroup
+ \enablemode[setups-pass-one]%
\hskip.5em\unknown\hskip.5em
\doif {\xmlatt{#1}{generated}} {yes} {
\ttsl
}
\tex{\e!stop}
- \xmlfilter{#1}{/sequence/variable/first()}
+ \xmlfilter{#1}{/sequence/first()}
\ignorespaces
\egroup
}
@@ -256,7 +529,7 @@
\startxmlsetups xml:setups:resolve
\ignorespaces
- \xmlfilterlist{\loadedsetups}{/interface/define[@name='\xmlatt{#1}{name}']/first()}
+ \xmlfilterlist{\loadedsetups}{interface/define[@name='\xmlatt{#1}{name}']/first()}
\stopxmlsetups
%D This is the first pass; here we generate the top line.