diff options
Diffstat (limited to 'tex/context/base/setupe.tex')
-rw-r--r-- | tex/context/base/setupe.tex | 81 |
1 files changed, 43 insertions, 38 deletions
diff --git a/tex/context/base/setupe.tex b/tex/context/base/setupe.tex index e7166b2bc..29ef61c61 100644 --- a/tex/context/base/setupe.tex +++ b/tex/context/base/setupe.tex @@ -8,8 +8,8 @@ %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \let\wait\relax @@ -41,9 +41,9 @@ \def\c!twoarguments! {cd:twoarguments} \def\c!threearguments! {cd:threearguments} -\def\subsetup#1{*#1} % ? +\def\subsetup#1{*#1} % ? -\beginTEX +\beginTEX \def\getinterfaceconstant#1% {\ifinterfacetranslation @@ -100,7 +100,7 @@ \long\def\doanother#1% {\dostring{\space\space\space\space}{}{#1\typespec/} - \let\typespec\empty} + \let\typespec\empty} \long\def\addtypespec#1#2% {\edef\typespec{\typespec\space#1="#2"}} @@ -115,41 +115,41 @@ \def\c!vals! {\addtypespec{list}{yes}\dovalvar{keywords}} \def\c!vars! {\addtypespec{list}{yes}\dovalvar{assignments}} -\def\c!arg! {\doanother{content}} -\def\c!cmd! {\doanother{csname}} +\def\c!arg! {\doanother{content}} +\def\c!cmd! {\doanother{csname}} \def\c!dest! {\doanother{reference}} -\def\c!dis! {\doanother{displaymath}} -\def\c!fil! {\doanother{file}} -\def\c!idx! {\doanother{index}} -\def\c!mat! {\doanother{math}} -\def\c!nop! {\doanother{nothing}} -\def\c!pos! {\doanother{position}} -\def\c!ref! {\doanother{reference}} -\def\c!trip! {\doanother{triplet}} -\def\c!wrd! {\doanother{word}} +\def\c!dis! {\doanother{displaymath}} +\def\c!fil! {\doanother{file}} +\def\c!idx! {\doanother{index}} +\def\c!mat! {\doanother{math}} +\def\c!nop! {\doanother{nothing}} +\def\c!pos! {\doanother{position}} +\def\c!ref! {\doanother{reference}} +\def\c!trip! {\doanother{triplet}} +\def\c!wrd! {\doanother{word}} \def\c!args! {\addtypespec{list}{yes}\c!arg!} \def\c!dests! {\addtypespec{list}{yes}\c!dest!} \def\c!idxs! {\addtypespec{list}{yes}\c!idx!} -\def\c!poss! {\addtypespec{list}{yes}\c!pos!} -\def\c!refs! {\addtypespec{list}{yes}\c!ref!} -\def\c!wrds! {\addtypespec{list}{yes}\c!wrd!} +\def\c!poss! {\addtypespec{list}{yes}\c!pos!} +\def\c!refs! {\addtypespec{list}{yes}\c!ref!} +\def\c!wrds! {\addtypespec{list}{yes}\c!wrd!} \def\c!trips! {\addtypespec{list}{yes}\c!trip!} \def\c!par! {\addtypespec{delimiter}{par}} % \par -\def\c!sep! {\addtypespec{separator}{backslash}} % \\ +\def\c!sep! {\addtypespec{separator}{backslash}} % \\ \def\c!stp! {} -\def\c!repeat! {} -\def\c!tex! #1{\addtypespec{command}{#1}\doanother{tex}} +\def\c!repeat! {} +\def\c!tex! #1{\addtypespec{command}{#1}\doanother{tex}} \def\c!or! #1#2{\doline{\space\space\space\space<cd:choice>}% #1#2% - \doline{\space\space\space\space</cd:choice>}} + \doline{\space\space\space\space</cd:choice>}} -% wrapper +% wrapper \def\startsetupfile - {\immediate\openout\scratchwrite=cont-\currentlanguage.xml + {\immediate\openout\scratchwrite=cont-\currentlanguage.xml \doline{\string<?xml version="1.0"?>} \doline{} \dostring{}{}{interface \SETUPnamespace\space name="context"}} @@ -164,7 +164,7 @@ \bgroup \catcode`\<=\@@other \unexpanded\gdef\dostring#1#2#3% - {\immediate\write\scratchwrite{#1<#2cd:#3>}} % todo + {\immediate\write\scratchwrite{#1<#2cd:#3>}} % todo \gdef\doline#1% {\immediate\write\scratchwrite{#1}} @@ -186,26 +186,26 @@ {\def\currenttype{#1}} \long\def\dovalue[#1]#2[#3]% - {\advance\scratchcounter 1 + {\advance\scratchcounter 1 \ifnum\scratchcounter=\currentwhatever\relax \processcommalist[#1]{\doval{#3}{\space\space\space\space\space\space}} \fi} \newif\ifinvariables -\long\def\dovariable[#1]#2[#3]#4[#5]% comes as sequence - {\ifinvariables\else\advance\scratchcounter 1 \fi +\long\def\dovariable[#1]#2[#3]#4[#5]% comes as sequence + {\ifinvariables\else\advance\scratchcounter 1 \fi \ifnum\scratchcounter=\currentwhatever\relax \invariablestrue \dostring{\space\space\space\space\space\space}{}% {parameter name="\getinterfaceconstant{#1}"} \processcommalist[#3] - {\doval{}{\space\space\space\space\space\space\space\space}} + {\doval{}{\space\space\space\space\space\space\space\space}} \dostring{\space\space\space\space\space\space}{/}{parameter} \fi} \long\def\doinheritvalues[#1]#2[#3]% - {\advance\scratchcounter 1 + {\advance\scratchcounter 1 \ifnum\scratchcounter=\currentwhatever\relax \dostring{\space\space\space\space\space\space}{}{inherit name="#1"/} \fi} @@ -223,7 +223,7 @@ \long\def\noinheritvalues [#1]#2[#3]{} \long\def\noinheritvariables[#1]#2[#3]{} -\bgroup \catcode`\<=\active +\bgroup \catcode`\<=\active \gdef\cleanupcurrentname{\def<<##1>>{##1}} @@ -241,12 +241,12 @@ \egroup -\newif\ifsetupisenvironment +\newif\ifsetupisenvironment \long\def\startsetup#1\stopsetup {\bgroup \doline{} - % zero pass + % zero pass \long\def\currentsetup{#1} % first pass \let\command \docommand @@ -269,19 +269,24 @@ {} % \def\envattr{ type="standalone"}} \convertargument<<\to\asciic \convertcommand\currentname\to\asciid - \findvariablename\currentname + \findvariablename\currentname \ExpandBothAfter\doifinstringelse{\asciic}{\asciid} - {\edef\envattr{\envattr\space generated="yes"}} - {} % \edef\envattr{\envattr\space generated="no"}} + {\edef\envattr{\envattr\space generated="yes"}} + {} % \edef\envattr{\envattr\space generated="no"}} \splitcurrentname \cleanupcurrentname + % \ifx\envattr\empty + % \message{\letterbackslash\currentname} + % \else + % \message{\letterbackslash\e!start\currentname} + % \fi \doifinsetelse{\currentname}{remark,menubutton,marking*figure,referring*figure}{% \doline{<!-- \currentname\space skipped -->}% }{% \dostring{}{}{command name="\currentname"\envattr} \def\next##1% {\ifx##1\empty - % skip + % skip \else\ifx##1\varname \dostring{\space\space\space\space}{}{variable value="##1"/} \else |