diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/core-mis.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/core-mis.mkiv | 237 |
1 files changed, 76 insertions, 161 deletions
diff --git a/Master/texmf-dist/tex/context/base/core-mis.mkiv b/Master/texmf-dist/tex/context/base/core-mis.mkiv index e2bd28bd511..06ee5b6173d 100644 --- a/Master/texmf-dist/tex/context/base/core-mis.mkiv +++ b/Master/texmf-dist/tex/context/base/core-mis.mkiv @@ -21,7 +21,7 @@ % %D % %D Obsolete now: % % -% % \def\documentstyle{\showmessage\m!systems3\empty\stoptekst} +% % \def\documentstyle{\showmessage\m!system3\empty\stoptekst} % % % % \let\documentclass=\documentstyle % %D \macros @@ -196,72 +196,6 @@ \c!inbetween={\blank[\v!medium]}, \c!after=\blank] -% \definieerplaats[naam][instellingen] -% \stelplaatsin[naam][instellingen] -% \plaats<naam>[[instellingen]] -% -% - still undocumented and also not in setupb yet -% - kan ook intern/direct (scheelt duplicatie), zie \framedtext - -\def\dodefineplacement[#1][#2]% - {\getparameters - [\??pl#1] - [\c!left=\hss, - \c!right=\hss, - \c!linecorrection=\v!off, - \c!depthcorrection=\v!off, - \c!margin=\v!standard, - \c!grid=\v!middle, - %\c!before=, - %\c!after=, - #2]% - \setvalue{\e!place#1}{\doplacement[\??pl#1]}} - -\unexpanded\def\defineplacement - {\dodoubleempty\dodefineplacement} - -\unexpanded\def\setupplacement - {\dodoubleempty\dosetupplacement} - -\def\dosetupplacement[#1]% - {\dodoubleempty\getparameters[\??pl#1]} - -\def\doplacement - {\dodoubleempty\dodoplacement} - -\def\dodoplacement[#1][#2]% correctie moet mooier - {\bgroup - \dowithnextboxcontent - {\forgetall} - {\setlocalhsize - \getparameters[#1][#2]% - \getvalue{#1\c!before}% - \begingroup - \disableparpositions - \setbox\nextbox\hbox to \localhsize - {\getvalue{#1\c!left}% - \flushnextbox - \getvalue{#1\c!right}}% - \ifinsidefloat \else - \addlocalbackgroundtobox\nextbox - \fi - \ifgridsnapping - \doifundefined{#1\c!grid}{\letvalue{#1\c!grid}\v!middle}% - % unchecked - \doifinset{\getvalue{#1\c!margin}}{\v!standard,\v!yes}\noindent - \snaptogrid[\getvalue{#1\c!grid}]\hbox{\flushnextbox}% - \else - \doifvalue{#1\c!linecorrection}\v!on \startbaselinecorrection - \doifinset{\getvalue{#1\c!margin}}{\v!standard,\v!yes}\noindent - \flushnextbox - \doifvalue{#1\c!depthcorrection}\v!on\baselinecorrection - \doifvalue{#1\c!linecorrection }\v!on\stopbaselinecorrection - \fi - \endgroup - \getvalue{#1\c!after}% - \egroup} - \vbox} - % Te zijner tijd [plaats=boven,onder,midden] implementeren, % in dat geval moet eerst de maximale hoogte worden bepaald. % @@ -292,7 +226,7 @@ \setvalue{\e!start\currentparagraph}% {\bgroup \edef\currentparagraph{#1}% - \letvalue{\s!do\s!next\currentparagraph}\empty + \letvalueempty{\s!do\s!next\currentparagraph}% \setvalue{\e!stop\currentparagraph}{\getvalue\currentparagraph\egroup}% \getvalue\currentparagraph}% \getparameters[\??al\currentparagraph]% @@ -576,8 +510,8 @@ \unexpanded\def\ongeveer {\mathematics\pm} - -\chardef\boundarycharactermode\plusone + +\setnewconstant\boundarycharactermode\plusone \def\midboundarycharacter#1#2% {\ifcase\boundarycharactermode @@ -590,7 +524,7 @@ \or \languageparameter#1% \fi - \chardef\boundarycharactermode\plusone} + \boundarycharactermode\plusone} \def\leftboundarycharacter#1#2% {\ifcase\boundarycharactermode @@ -601,7 +535,7 @@ \or \languageparameter#1% \fi - \chardef\boundarycharactermode\plusone} + \boundarycharactermode\plusone} \def\rightboundarycharacter#1#2% {\ifcase\boundarycharactermode @@ -612,7 +546,7 @@ \or \languageparameter#1% \fi - \chardef\boundarycharactermode\plusone} + \boundarycharactermode\plusone} % actually this is pretty old, but temporary moved here % @@ -706,11 +640,13 @@ \ifnum\subsentencelevel=\plusone \dontleavehmode % was \leaveoutervmode \fi + \dostarttagged\t!subsentence\empty \symbol[\ifodd\subsentencelevel\c!leftsentence\else\c!leftsubsentence\fi]% }% \ignorespaces} \def\endofsubsentence % relax prevents space gobbling {\symbol[\ifodd\subsentencelevel\c!rightsentence\else\c!rightsubsentence\fi]% + \dostoptagged \global\advance\subsentencelevel\minusone \unskip \kern\subsentencesignal\relax @@ -741,23 +677,7 @@ \unexpanded\def\startsubsentence{\beginofsubsentence \prewordbreak\beginofsubsentencespacing} \unexpanded\def\stopsubsentence {\endofsubsentencespacing\prewordbreak\endofsubsentence} - -%D \defineXMLenvironment [subsentence] -%D {|<|} -%D {|>|} -%D \defineXMLenvironment [subsentence] -%D {\directdiscretionary{<}} -%D {\directdiscretionary{>}} -%D \defineXMLenvironment [subsentence] -%D {\startsubsentence} -%D {\stopsubsentence} -%D -%D \startbuffer -%D test <subsentence>test</subsentence> test -%D \stopbuffer -%D -%D \typebuffer -%D \processXMLbuffer +\unexpanded\def\subsentence {\groupedcommand\startsubsentence\stopsubsentence} \enableactivediscretionaries @@ -885,6 +805,7 @@ \unexpanded\def\startdelimitedtext[#1]% {\bgroup \pushdelimitedtext{#1}% + \dostarttagged\t!delimitedblock\currentdelimitedtext \doifelse{\delimitedtextparameter\c!method}\s!font {\def\dostopdelimitedtext {\removeunwantedspaces\ignoredelimitedtext\c!right}% @@ -895,39 +816,6 @@ \doifinsetelse{\delimitedtextparameter\c!location}{\v!paragraph,\v!margin}% {\dosingleempty\dostartdelimitedtextpar}\dostartdelimitedtexttxt}} -% \def\dostartdelimitedtextpar[#1]% -% {\let\dostopdelimitedtext\dostopdelimitedtextpar -% \doifsomething{\delimitedtextparameter\c!spacebefore} -% {\blank[\delimitedtextparameter\c!spacebefore]}% -% \delimitedtextparameter\c!before -% % nicer: -% % \doadaptleftskip {\delimitedtextparameter\c!leftmargin}% -% % \doadaptrightskip{\delimitedtextparameter\c!rightmargin}% -% % backward compatible: -% \doifelsenothing{#1} -% {\endgraf -% \doadaptleftskip {\delimitedtextparameter\c!leftmargin}% -% \doadaptrightskip{\delimitedtextparameter\c!rightmargin}% -% \let\dodostopdelimitedtextpar\endgraf} -% {\startnarrower[#1]\let\dodostopdelimitedtextpar\stopnarrower}% -% % so far -% % \dochecknextindentation{\??ci\currentdelimitedtext}% AM: not here -% \dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color\empty -% \leftdelimitedtextmark -% \ignorespaces} - -% \def\dostopdelimitedtextpar -% {\removeunwantedspaces -% \removelastskip -% \rightdelimitedtextmark -% \dostopattributes -% \dodostopdelimitedtextpar -% \delimitedtextparameter\c!after -% \doifsomething{\delimitedtextparameter\c!spaceafter} -% {\blank[\delimitedtextparameter\c!spaceafter]}% -% \dochecknextindentation{\??ci\currentdelimitedtext}% AM: here -% \dorechecknextindentation}% AM: This was missing! - \def\dostartdelimitedtextpar[#1]% {\let\dostopdelimitedtext\dostopdelimitedtextpar \doifsomething{\delimitedtextparameter\c!spacebefore} @@ -978,6 +866,7 @@ \unexpanded\def\stopdelimitedtext {\dostopdelimitedtext + \dostoptagged \popdelimitedtext \egroup} @@ -1113,35 +1002,56 @@ \def\handlerightdelimitedtext#1% {\dohandlerightdelimitedtext{#1}\relax} +% \unexpanded\def\dodelimitedtextpar +% {\dohandleleftdelimitedtext\c!left\relax +% \groupedcommand +% \donothing +% {\dohandlerightdelimitedtext\c!right\removelastskip +% \popdelimitedtext}} + \unexpanded\def\dodelimitedtextpar - {\dohandleleftdelimitedtext\c!left\relax - \groupedcommand - \donothing + {\groupedcommand + {\dostarttagged\t!delimited\currentdelimitedtext % block? + \dohandleleftdelimitedtext\c!left\relax} {\dohandlerightdelimitedtext\c!right\removelastskip + \dostoptagged \popdelimitedtext}} \unexpanded\def\dodelimitedtexttxt {\doifelse{\delimitedtextparameter\c!style}\v!normal \doquoteddelimited\doattributeddelimited} +% \def\doquoteddelimited +% {\dohandleleftdelimitedtext\c!left\relax +% \groupedcommand +% \donothing +% {\dohandlerightdelimitedtext\c!right +% \removelastskip +% \popdelimitedtext}} + \def\doquoteddelimited - {\dohandleleftdelimitedtext\c!left\relax - \groupedcommand - \donothing + {\groupedcommand + {\dostarttagged\t!delimited\currentdelimitedtext + \dohandleleftdelimitedtext\c!left\relax} {\dohandlerightdelimitedtext\c!right \removelastskip + \dostoptagged \popdelimitedtext}} \def\doattributeddelimited {\groupedcommand - {\dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color} + {\dostarttagged\t!delimited\currentdelimitedtext + \dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color} {\dostopattributes + \dostoptagged \popdelimitedtext}} \def\dofontdrivendelimited {\simplegroupedcommand - {\languageparameter{\c!left\currentdelimitedtext}} + {\dostarttagged\t!delimited\currentdelimitedtext + \languageparameter{\c!left\currentdelimitedtext}} {\languageparameter{\c!right\currentdelimitedtext}% + \dostoptagged \popdelimitedtext}} % testcase for nesting: @@ -1330,12 +1240,12 @@ [\c!bet=\unknown,\c!dat=\unknown,\c!ken=\unknown, \c!from=,\c!to=,\c!ref=,#1]% % moet anders, hoort niet in 01b - \assigntranslation[\s!nl=referentie,\s!en=reference,\s!de=Referenz,\s!sp=referencia]\to\@@@kmref - \assigntranslation[\s!nl=van,\s!en=from,\s!de=Von,\s!sp=de]\to\@@@kmvan - \assigntranslation[\s!nl=aan,\s!en=to,\s!de=An,\s!sp=a]\to\@@@kmaan - \assigntranslation[\s!nl=betreft,\s!en=concerns,\s!de=Betreff,\s!sp=]\to\@@@kmbet - \assigntranslation[\s!nl=datum,\s!en=date,\s!de=Datum,\s!sp=fecha]\to\@@@kmdat - \assigntranslation[\s!nl=kenmerk,\s!en=mark,\s!de=Kennzeichen,\s!sp=]\to\@@@kmken + \assigntranslation[\s!nl=referentie,\s!en=reference,\s!de=Referenz,\s!hr=referenca,\s!sp=referencia]\to\@@@kmref + \assigntranslation[\s!nl=van,\s!en=from,\s!de=Von,\s!hr=od,\s!sp=de]\to\@@@kmvan + \assigntranslation[\s!nl=aan,\s!en=to,\s!de=An,\s!hr=za,\s!sp=a]\to\@@@kmaan + \assigntranslation[\s!nl=betreft,\s!en=concerns,\s!de=Betreff,\s!hr=predmet,\s!sp=]\to\@@@kmbet + \assigntranslation[\s!nl=datum,\s!en=date,\s!de=Datum,\s!hr=datum,\s!sp=fecha]\to\@@@kmdat + \assigntranslation[\s!nl=kenmerk,\s!en=mark,\s!de=Kennzeichen,\s!hr=oznaka,\s!sp=]\to\@@@kmken % \definetabulate[\s!dummy][|l|p|] \startdummy @@ -1647,31 +1557,34 @@ \let\next=} \hbox} +\setnewconstant\pairedlocationa\plusone +\setnewconstant\pairedlocationb\plusfour + \def\beforefirstpairedbox - {\chardef\pairedlocationa1 % left - \chardef\pairedlocationb4 % middle + {\pairedlocationa\plusone % left + \pairedlocationb\plusfour % middle \getfromcommacommand[\@@ldlocation][1]% \processaction [\commalistelement] - [ \v!left=>\chardef\pairedlocationa0, - \v!right=>\chardef\pairedlocationa1, - \v!top=>\chardef\pairedlocationa2, - \v!bottom=>\chardef\pairedlocationa3]% + [ \v!left=>\pairedlocationa\zerocount, + \v!right=>\pairedlocationa\plusone, + \v!top=>\pairedlocationa\plustwo, + \v!bottom=>\pairedlocationa\plusthree]% \getfromcommacommand[\@@ldlocation][2]% \processaction [\commalistelement] - [ \v!left=>\chardef\pairedlocationb0, - \v!right=>\chardef\pairedlocationb1, - \v!high=>\chardef\pairedlocationb2, - \v!top=>\chardef\pairedlocationb2, - \v!low=>\chardef\pairedlocationb3, - \v!bottom=>\chardef\pairedlocationb3, - \v!middle=>\chardef\pairedlocationb4]} + [ \v!left=>\pairedlocationb\zerocount, + \v!right=>\pairedlocationb\plusone, + \v!high=>\pairedlocationb\plustwo, + \v!top=>\pairedlocationb\plustwo, + \v!low=>\pairedlocationb\plusthree, + \v!bottom=>\pairedlocationb\plusthree, + \v!middle=>\pairedlocationb\plusfour]} \def\betweenbothpairedboxes {\switchtobodyfont[\@@ldbodyfont]% split under same regime \setbox\firstpairedbox\flushnextbox - \ifnum\pairedlocationa<2 + \ifnum\pairedlocationa<\plustwo \hsize\wd\firstpairedbox % trick \hsize\@@ldwidth \scratchdimen\wd\firstpairedbox @@ -1700,9 +1613,9 @@ \else \flushnextbox \fi}% - \ifnum\pairedlocationa<2\hbox\else\vbox\fi\bgroup % hide vsize + \ifnum\pairedlocationa<\plustwo\hbox\else\vbox\fi\bgroup % hide vsize \forgetall - \ifnum\pairedlocationa<2 + \ifnum\pairedlocationa<\plustwo \scratchdimen\maxoftwoboxdimens\ht\firstpairedbox\secondpairedbox \vsize\scratchdimen \ifdim\scratchdimen<\@@ldheight\relax % can be \vsize @@ -1727,9 +1640,9 @@ \fi \ifdim\scratchdimen>\ht\secondpairedbox \setbox\secondpairedbox\vbox to \scratchdimen - {\ifnum\pairedlocationa=3 \vss\fi % + {\ifnum\pairedlocationa=\plusthree \vss\fi % \box\secondpairedbox - \ifnum\pairedlocationa=2 \vss\fi}% \kern\zeropoint + \ifnum\pairedlocationa=\plustwo \vss\fi}% \kern\zeropoint \fi \fi \ifcase\pairedlocationa @@ -1833,6 +1746,7 @@ \doifelse{\combinationparameter\c!height}\v!fit \vbox {\vbox to \combinationparameter\c!height}% \bgroup +\let\combination\empty % permits \combination{}{} handy for cld \expanded{\dodostartcombination[\currentcombinationspec]}} \long\def\dodostartcombination[#1*#2*#3]% @@ -2011,7 +1925,7 @@ \def\dostartfloatcombination[#1][#2]% {\vbox\bgroup %\insidecolumnstrue % trick, forces no centering, todo: proper switch/feature - \chardef\postcenterfloatmethod\zerocount + \postcenterfloatmethod\zerocount \forcelocalfloats \unexpanded\def\stopfloatcombination {\scratchtoks\emptytoks @@ -2357,7 +2271,7 @@ %D character and the fractional digits (we use 57 as %D sample). Here we combine all methods in one macros. -\chardef\vulgarfractionmethod=3 +\setnewconstant\vulgarfractionmethod\plusthree \definehspace[vulgarfraction][.25em] % [.15em] \definesymbol[vulgarfraction][/] % [\raise.2ex\hbox{/}] @@ -2390,10 +2304,10 @@ %D \HL %D \NC \bf method \NC \bf visualization \NC\NR %D \HL -%D \NC 0 \NC \chardef\vulgarfractionmethod0\vulgarfraction{1}{2} \NC\NR -%D \NC 1 \NC \chardef\vulgarfractionmethod1\vulgarfraction{1}{2} \NC\NR -%D \NC 2 \NC \chardef\vulgarfractionmethod2\vulgarfraction{1}{2} \NC\NR -%D \NC 3 \NC \chardef\vulgarfractionmethod3\vulgarfraction{1}{2} \NC\NR +%D \NC 0 \NC \vulgarfractionmethod0 \vulgarfraction{1}{2} \NC\NR +%D \NC 1 \NC \vulgarfractionmethod1 \vulgarfraction{1}{2} \NC\NR +%D \NC 2 \NC \vulgarfractionmethod2 \vulgarfraction{1}{2} \NC\NR +%D \NC 3 \NC \vulgarfractionmethod3 \vulgarfraction{1}{2} \NC\NR %D \HL %D \stoptabulate @@ -2460,6 +2374,7 @@ \setuplabeltext [\s!nl] [and-1=\textcomma\ , and-2= en ] \setuplabeltext [\s!en] [and-1=\textcomma\ , and-2=\textcomma\ and ] \setuplabeltext [\s!de] [and-1=\textcomma\ , and-2= und ] +\setuplabeltext [\s!hr] [and-1=\textcomma\ , and-2= i ] %D \macros %D {somekindoftab} |