summaryrefslogtreecommitdiff
path: root/tex/context
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2005-06-21 00:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2005-06-21 00:00:00 +0200
commitdddd4cf24fcf8ef5f9c76acb7da468f502cd0bcd (patch)
tree868075883ed03d7c02bc2860a53ffb25b93e4ce5 /tex/context
parentdfec7488b8da12222bdaa42df6f5585b2b89fd70 (diff)
downloadcontext-dddd4cf24fcf8ef5f9c76acb7da468f502cd0bcd.tar.gz
stable 2005.06.21
Diffstat (limited to 'tex/context')
-rw-r--r--tex/context/base/colo-ini.tex7
-rw-r--r--tex/context/base/cont-new.tex385
-rw-r--r--tex/context/base/cont-old.tex42
-rw-r--r--tex/context/base/core-box.tex16
-rw-r--r--tex/context/base/core-des.tex2
-rw-r--r--tex/context/base/core-fig.tex4
-rw-r--r--tex/context/base/core-int.tex2
-rw-r--r--tex/context/base/core-itm.tex51
-rw-r--r--tex/context/base/core-job.tex4
-rw-r--r--tex/context/base/core-new.tex9
-rw-r--r--tex/context/base/core-rul.tex168
-rw-r--r--tex/context/base/core-sec.tex3
-rw-r--r--tex/context/base/core-spa.tex78
-rw-r--r--tex/context/base/enco-cyr.tex2
-rw-r--r--tex/context/base/enco-ini.tex16
-rw-r--r--tex/context/base/font-ini.tex53
-rw-r--r--tex/context/base/lang-ini.tex4
-rw-r--r--tex/context/base/mult-sys.tex1
-rw-r--r--tex/context/base/page-imp.tex2
-rw-r--r--tex/context/base/page-ini.tex6
-rw-r--r--tex/context/base/page-lin.tex48
-rw-r--r--tex/context/base/page-lyr.tex11
-rw-r--r--tex/context/base/page-mar.tex17
-rw-r--r--tex/context/base/page-mul.tex32
-rw-r--r--tex/context/base/page-one.tex34
-rw-r--r--tex/context/base/page-set.tex86
-rw-r--r--tex/context/base/s-pre-00.tex4
-rw-r--r--tex/context/base/s-pre-60.tex1
-rw-r--r--tex/context/base/s-pre-61.tex22
-rw-r--r--tex/context/base/spec-tpd.tex3
-rw-r--r--tex/context/base/supp-fil.tex24
-rw-r--r--tex/context/base/supp-pdf.tex60
-rw-r--r--tex/context/base/syst-ext.tex62
-rw-r--r--tex/context/base/syst-new.tex29
-rw-r--r--tex/context/base/type-buy.tex50
-rw-r--r--tex/context/base/type-cbg.tex14
-rw-r--r--tex/context/base/type-ini.tex24
-rw-r--r--tex/context/base/type-pre.tex5
-rw-r--r--tex/context/base/unic-033.tex138
-rw-r--r--tex/context/base/unic-034.tex311
-rw-r--r--tex/context/base/verb-ini.tex4
-rw-r--r--tex/context/base/xtag-ini.tex37
-rw-r--r--tex/context/base/xtag-map.tex7
-rw-r--r--tex/context/interface/keys-cz.xml2
-rw-r--r--tex/context/interface/keys-de.xml2
-rw-r--r--tex/context/interface/keys-en.xml2
-rw-r--r--tex/context/interface/keys-it.xml2
-rw-r--r--tex/context/interface/keys-nl.xml2
-rw-r--r--tex/context/interface/keys-ro.xml2
49 files changed, 1289 insertions, 601 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index 34e8a3494..b9fa01cfb 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -1384,8 +1384,13 @@
\startcolormode\maintextcolor
\fi}
+% \def\localstoptextcolor
+% {\stopcolormode}
+%
+% better:
+
\def\localstoptextcolor
- {\stopcolormode}
+ {\restorecolormode}
\def\restoretextcolor
{\ifx\maintextcolor\empty
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 9f5e352b0..420f02f59 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -24,229 +24,9 @@
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex}
-\ifx\normalcompound\undefined \let\normalcompound=| \fi
+\let\cs\getvalue
-% accepts \head test \type{x{x}x} test ...
-
-\def\dostartitemattributes#1{\dostartattributes{\??op\currentitemgroup#1}}
-\def\dostopitemattributes {\dostopattributes}
-
-\def\complexdoitemgrouphead[#1]% beter in \complexdosom hangen met een if
- {\iffirstlist\else\doitembreak\allowbreak\fi
- \ifpackeditems\else\getitemparameter\itemlevel\c!beforehead\fi
- \iffirstlist\ifitemintro\else\ifcase\itemlevel % incr in \complexdosom
- \doitembreak\allowbreak
- \fi\fi\fi
- \complexdoitemgroupitem[#1]%
- \bgroup
- \dostartitemattributes\itemlevel\c!headstyle\c!headcolor\empty
- \ignorespaces
- \let\par\enditemhead} % brrrr but simple anyway
-
-\def\enditemhead
- {\removeunwantedspaces
- \dostopitemattributes
- \egroup
- \iftextitems
- \space\ignorespaces
- \else
- \par
- \fi
- \doitembreak\nobreak
- \ifpackeditems\else\getitemparameter\itemlevel\c!afterhead\fi
- \doitembreak\nobreak
- \noindentation}
-
-\def\greedysplitstring#1\at#2\to#3\and#4%
- {\edef\asciib{#1}%
- \let\asciic\asciib
- \let#3\empty
- \let#4\empty
- \doloop
- {\expandafter\splitstring\asciib\at#2\to\asciia\and\asciib
- \ifx\asciib\empty
- \exitloop
- \else
- % not \edef#3{\ifx#3\empty\else#3#2\fi\asciia} else
- % /root/path fails because then #3==empty
- \edef#3{\ifcase\recurselevel\or\else#3#2\fi\asciia}%
- \let#4\asciib
- \fi}%
- \ifx#3\empty\let#3\asciic\fi}
-
-% \splitfilename{oeps/test.pdf} [\splitoffpath\quad\splitoffname\quad\splitofftype]
-% \splitfilename{/oeps/test.pdf} [\splitoffpath\quad\splitoffname\quad\splitofftype]
-% \splitfilename{/test.pdf} [\splitoffpath\quad\splitoffname\quad\splitofftype]
-
-\def\splitfilename#1%
- {\edef\splitofffull{#1}% normally outside this call: \sanitizefilename#1\to\sanitizedfilename
- \greedysplitstring\splitofffull\at/\to\splitoffpath\and\splitoffbase
- \ifx\splitoffpath\splitofffull
- \let\splitoffpath\empty
- \fi
- \ifx\splitoffbase\empty
- \let\splitoffpath\empty
- \let\splitoffbase\splitofffull
- \fi
- \greedysplitstring\splitoffbase\at.\to\splitoffname\and\splitofftype
- \chardef\splitoffkind % can be used to test if pathpart was empty
- \ifx\splitoffpath\empty \zerocount \else
- \ifx\splitoffpath\splitoffroot \plusone \else
- \plustwo \fi\fi
- \ifx\splitoffname\empty\let\splitoffname\splitoffbase\fi
- \ifx\splitoffpath\empty\let\splitoffpath\splitoffroot\fi}
-
-\def\stoplocalframed
- {\dontshowcomposition
- \@@stopframedorientation
- \ifboxhasformat
- \ifx\localwidth\v!fit
- \ifreshapeframebox\doreshapeframedbox\fi
- \boxhaswidthfalse
- \else\ifx\localwidth\v!fixed
- \boxhaswidthfalse
- \else
- \resetshapeframebox
- \fi\fi
- \else
- \resetshapeframebox
- \fi
- \ifboxhaswidth
- \wd\framebox\!!widtha
- \fi
- \ifboxhasheight
- \ht\framebox\!!heighta
- \fi
- \doifvalue{\@@framed\c!empty}\v!yes
- {\setbox\scratchbox\null
- \wd\scratchbox\wd\framebox
- \ht\scratchbox\ht\framebox
- \dp\scratchbox\dp\framebox
- \setbox\framebox\box\scratchbox}%
- \stopregistercolor
- \docolorframebox
- \ifboxhasoffset
- \dooffsetframebox
- \fi
- \ifboxisoverlaid \else
- \dolocateframebox
- \fi
- \ifx\postprocessframebox\relax \else
- \let\next\postprocessframebox
- \let\postprocessframebox\relax % prevent nesting
- \next\framebox
- \fi
- \edef\overlaylinecolor{\framedparameter\c!framecolor}%
- \edef\overlaylinewidth{\the\ruledlinewidth}% \@@...
- \ifboxhasframe % real or invisible frame
- \doframedbox
- \fi
- \doifvaluesomething{\@@framed\c!background}\dobackedbox
- \handleframedlocator\@@locallocation
- \box\framebox
- \egroup
- \egroup}
-
-\def\installframedlocator#1#2%
- {\setvalue{\??ol:\c!location:#1}{#2}}
-
-\def\handleframedlocator#1%
- {\getvalue{\??ol:\c!location:#1}}
-
-\def\doprelocframedbox#1%
- {\scratchdimen#1\relax
- \advance\scratchdimen \ruledlinewidth
- \ifboxhasoffset
- \advance\scratchdimen \framedparameter\c!offset
- \fi
- \scratchskip\ht\framebox
- \advance\scratchskip-\scratchdimen}
-
-\installframedlocator \v!hanging % best with strut=no
- {\dp\framebox\ht\framebox
- \ht\framebox\zeropoint}
-
-\installframedlocator \v!depth
- {\scratchdimen\ht\framebox
- \advance\scratchdimen -\strutdp
- \ht\framebox\scratchdimen
- \dp\framebox\strutdp
- \box\framebox}
-
-\installframedlocator \v!height
- {\scratchdimen\ht\framebox
- \advance\scratchdimen -\strutht
- \ht\framebox\strutht
- \dp\framebox\scratchdimen
- \box\framebox}
-
-\installframedlocator \v!high
- {\doprelocframedbox\strutht
- \setbox\framebox\hbox{\lower\scratchskip\box\framebox}%
- \ht\framebox\strutht
- \dp\framebox\strutdp
- \hbox{\box\framebox}}
-
-\installframedlocator \v!line
- {\setbox\framebox\hbox{\lower.5\ht\framebox\box\framebox}%
- \ht\framebox.5\lineheight
- \dp\framebox.5\lineheight
- \hbox{\box\framebox}}
-
-\installframedlocator \v!low
- {\doprelocframedbox\strutdp
- \setbox\framebox\hbox{\lower\scratchdimen\box\framebox}%
- \ht\framebox\strutht
- \dp\framebox\strutdp
- \box\framebox}
-
-\installframedlocator \v!top
- {\doprelocframedbox\strutht
- \setbox\framebox\hbox{\lower\scratchskip\box\framebox}%
- \ht\framebox\scratchdimen
- \dp\framebox\scratchskip
- \hbox{\box\framebox}}
-
-\installframedlocator \v!middle
- {\scratchdimen.5\ht\framebox
- \setbox\framebox\hbox{\lower\scratchdimen\box\framebox}%
- \ht\framebox\scratchdimen
- \dp\framebox\scratchdimen
- \hbox{\box\framebox}}
-
-\installframedlocator \v!lohi
- {\handleframedlocator\v!middle}
-
-\installframedlocator \v!bottom
- {\doprelocframedbox\strutdp
- \setbox\framebox\hbox{\lower\scratchdimen\box\framebox}%
- \ht\framebox\scratchskip
- \dp\framebox\scratchdimen
- \hbox{\box\framebox}}
-
-% \starttext
-% \ruledhbox
-% {A
-% \framed[width=2cm,align=middle,location=hanging]{location\\equals\\hanging}
-% \framed[width=2cm,align=middle,location=depth] {location\\equals\\depth}
-% \framed[width=2cm,align=middle,location=height] {location\\equals\\height}
-% B}
-% \vskip2cm
-% \ruledhbox
-% {A
-% \framed[width=2cm,align=middle,location=low] {location\\equals\\low}
-% \framed[width=2cm,align=middle,location=line] {location\\equals\\line}
-% \framed[width=2cm,align=middle,location=high] {location\\equals\\high}
-% B}
-% \vskip2cm
-% \ruledhbox
-% {A
-% \framed[width=2cm,align=middle,location=top] {location\\equals\\top}
-% \framed[width=2cm,align=middle,location=bottom] {location\\equals\\bottom}
-% \framed[width=2cm,align=middle,location=lohi] {location\\equals\\lohi}
-% \framed[width=2cm,align=middle,location=middle] {location\\equals\\middle}
-% B}
-% \stoptext
+\ifx\normalcompound\undefined \let\normalcompound=| \fi
% experimental so this may change
@@ -342,66 +122,6 @@
%
% \shapesynonym{eacute}
-\def\OTRSETnobalance
- {\iflastcolumnfootnotes % testen ! optie
- % inhibit flush of floats !
- % todo: nothing if no footnotes, else empty page
- \dostepwiserecurse\mofcolumns\nofcolumns\plusone
- {\vskip-\struttotal\verticalstrut\vfill\eject}%
- \else
-\ifnum\mofcolumns>\plusone
- \donetrue
-\else\ifdim\pagetotal>\zeropoint % too dangerous, we loose data
- \donetrue
-\else
- \donefalse
-\fi\fi
- \ifdone
- \ifnum\mofcolumns=\nofcolumns
- \OTRSETflushfinalfootnotes
- \else
- % probably todo
- \fi
- \vfill
- \eject
- % brr, may result in empty page after nicely fit text
- % or if left, then lost of first column only text
- \ifnum\mofcolumns>\plusone
- \OTRSETdofinalflush
- \OTRSETdofinaloutput
- \fi
- \fi
- \fi}
-
-% move from page-mar -> cors-spa
-
-\beginETEX
-
- \def\keeplinestogether#1%
- {\xdef\restoreinterlinepenalty{\global\resetpenalties\interlinepenalties}%
- \global\setpenalties\interlinepenalties{#1}\!!tenthousand}
-
-\endETEX
-
-\beginTEX
-
- \def\keeplinestogether#1%
- {\xdef\restoreinterlinepenalty
- {\global\let\restoreinterlinepenalty\relax
- \global\interlinepenalty=\the\interlinepenalty}% keep = here
- \global\interlinepenalty\!!tenthousand}
-
-\endTEX
-
-\def\setmargincontentpenalties
- {\getnoflines\margincontentheight
- \keeplinestogether\noflines}
-
-\def\undepthed
- {\dowithnextbox{\nextboxdp\zeropoint\flushnextbox}\hbox}
-
-\def\rawsectionnumber#1{\countervalue{\??se#1}}
-
% new: \forcebaselinecorrection --> core-spa & core-grd
\chardef\baselinecorrectionmode\plusone
@@ -544,10 +264,6 @@
\egroup
-% in xtag-map:
-
-\unexpanded\def\xmlrent#1{\doXMLentity#1;}
-
% \page[left]
% \definecolumntextarea[intro][left][x=1,y=1,nx=4,ny=20,state=start,background=introlayer]
% \setupcolumntextareatext[intro][left][\setups{intro}]
@@ -675,88 +391,6 @@
{\XMLexpanded{\scratchtoks{\enableXML#2}}%
\expanded{\normalsetnormalmark{#1}{\the\scratchtoks}}}
-\def\checksoundtrack#1%
- {\iflocation
- \doifdefined{\??sd:#1}{\doifvaluesomething{\??sd:#1}
- {\doinsertsoundtrack{\getvalue{\??sd:#1}}{#1}\@@sdoption
- % brr, \..empty not really needed and maybe even wrong;
- % also, not here but in driver
- % well, no: sounds need to be reinitialize each time (i.e., be on page), so no
- }}% \letgvalueempty{\??sd:#1}}}%
- \fi}
-
-\def\placemargincontent
- {\ifcase\margintextcollected\else % was level check
- \bgroup
- \redoconvertfont % !!
- \chardef\graphicvadjustmode\zerocount
- \doflushmargincontents
- \egroup
- \fi}
-
-\def\noconvertfont#1% #2%
- {\doifdefinedelse{\@noletter@#1}
- {\doifelsenothing{#1}\gobbleoneargument\@@donoconvertfont}\gobbleoneargument
- {#1}} % {#2}}
-
-\appendtoks
- \spacing\!!plusone % new per 10/08/2004, else problems in otr / !! needed
-\to \everyforgetall
-
-% \dorecurse{50}
-% {[before normal] \input thuan
-% \placefigure{normal}{\framed[height=1cm,width=8cm]{}}
-% \placefigure{normal}{\framed[height=2cm,width=8cm]{}}
-% [before force] \input thuan
-% \placefigure[force]{force}{\framed[height=8cm,width=8cm]{}}}
-
-\chardef\fixedfloatmethod=3
-
-\def\OTRONEsomefixdfloat % [#1]
- {\docheckiffloatfits
- \ifroomforfloat\else
- \ifzeropt\pagetotal
- % let's assume that there is room
- \else
- \ifcase\fixedfloatmethod
- % disabled
- \or % 1 (old method)
- \goodbreak
- \or % 2 (safe method)
- \page
- \or % 3 (keeps in stream)
- \vskip-.5\floatheight % play safe
- \vskip\textheight
- \fi
- \fi
- \fi
- \showmessage\m!floatblocks9\empty
- \someherefloat} % [#1]
-
-%D \starttyping
-%D {\sanitizePDFdocencoding test \CONTEXT\ test \to\oeps\stripstring\oeps\tttf[\oeps]}
-%D \stoptyping
-
-\def\stripstring#1% #1 is \cs
- {\bgroup
- \convertcommand#1\to\ascii
- \global\let\globalascii\empty
- \donefalse
- \expandafter\handletokens\ascii\with\dostripstring
- \egroup
- \let#1\globalascii}
-
-\def\dostripstring#1%
- {\ifx#1\blankspace
- \donetrue
- \else
- \ifdone\ifx\globalascii\empty\else
- \xdef\globalascii{\globalascii\space}%
- \donefalse
- \fi\fi
- \xdef\globalascii{\globalascii#1}%
- \fi}
-
%D Ok, I got tired of making dedicated clean up macros using the
%D same mechanism again and again, so now we have:
%D
@@ -1033,21 +667,6 @@
% \defineXMLenvironment[showpardata] \startshowpardata \stopshowpardata
% \defineXMLsingular [showpardata] \showpardata
-\newskip\@@raggedskipa
-\newskip\@@raggedskipb
-
-\def\setraggedness#1%
- {\ifnum\tolerance<1500\relax % small values have
- \tolerance1500\relax % unwanted side effects
- \fi
- \ifx\dohyphens\relax
- % this code will be reconsidered / kind of fuzzy (and old)
- \@@raggedskipa 2.5\hsize
- \@@raggedskipb #1\relax
- \divide\@@raggedskipa \@@raggedskipb
- \hyphenpenalty\@@raggedskipa
- \fi}
-
% todo : test low level translation (nl->en) and optimize script
% \definestylecollection[mine]
diff --git a/tex/context/base/cont-old.tex b/tex/context/base/cont-old.tex
index 2e2825131..d0529c695 100644
--- a/tex/context/base/cont-old.tex
+++ b/tex/context/base/cont-old.tex
@@ -23,21 +23,6 @@
\def\substitutecommand#1#2%
{\gdef#1{\dosubstitutecommand{#1}{#2}}}
-%substitutecommand \stelopsomminginopniveau \stelopsommingin
-%substitutecommand \stelopsommingvolledigin \stelopsommingin
-%substitutecommand \stelsomsymboolin \definieersymbool
-%substitutecommand \somsymbool \symbool
-
-%substitutecommand \stelzetspiegelin \stellayoutin
-%substitutecommand \stelmargesin \stellayoutin
-%substitutecommand \steloffsetin \stellayoutin
-
- %def \edgewidth {\rightedgewidth}
-
-%substitutecommand \steldoordefinitiein \steldoordefinierenin
-%substitutecommand \steldoornummerin \steldoornummerenin
-%substitutecommand \steldoorsprongin \steldoorspringenin
-
\substitutecommand \volgendehoofdstuk {\setupheadnumber[hoofdstuk][+1]}
\substitutecommand \volgendeparagraaf {\setupheadnumber[paragraaf][+1]}
\substitutecommand \volgendesubparagraaf {\setupheadnumber[subparagraaf][+1]}
@@ -54,33 +39,8 @@
\substitutecommand \definieersynoniem \definesynonyms
-%substitutecommand \stelvoetnootin \stelvoetnotenin
-
-%substitutecommand \karakters \uitgerekt
-
-%substitutecommand \diepevoetnoot \voetnoot
-
-% english:
-
-%substitutecommand \setupformulas \setupformulae
-
-%substitutecommand \useexternalfigures \setupexternalfigures
-
\substitutecommand \setupintermezzos \setupintermezzi
-%substitutecommand \leftlined \leftaligned
-%substitutecommand \middlelined \midaligned
-%substitutecommand \rightlined \rightaligned
-
-%substitutecommand \setupcorps \setupbodyfont
-%substitutecommand \switchtocorps \switchtobodyfont
-%substitutecommand \definecorps \definebodyfont
-%substitutecommand \definecorpsenvironment \definebodyfontenvironment
-%substitutecommand \showcorps \showbodyfont
-%substitutecommand \showcorpsenvironment \showbodyfontenvironment
-
- %def \corpssize {\bodyfontsize}
-
-\substitutecommand \showencoding {\showaccents\showcharacters}
+\let \Everybodyfont \EveryBodyFont
\protect \endinput
diff --git a/tex/context/base/core-box.tex b/tex/context/base/core-box.tex
index 081954734..fa576b5cb 100644
--- a/tex/context/base/core-box.tex
+++ b/tex/context/base/core-box.tex
@@ -659,6 +659,22 @@
\definelayerpreset
[\v!middle\v!right]
[\c!location=\v!left,\c!hoffset=\layerwidth,\c!voffset=.5\layerheight]
+
+\definelayerpreset
+ [\v!middle\v!top]
+ [\c!location=\v!bottom,\c!corner=\v!top,\c!dx=.5\layerwidth]
+
+\definelayerpreset
+ [\v!middle\v!bottom]
+ [\c!location=\v!top,\c!corner=\v!bottom,\c!dx=.5\layerwidth]
+
+\definelayerpreset
+ [\v!middle\v!left]
+ [\c!location=\v!right,\c!corner=\v!left,\c!dy=.5\layerwidth]
+
+\definelayerpreset
+ [\v!middle\v!right]
+ [\c!location=\v!left,\c!corner=\v!right,\c!dy=.5\layerheight]
\def\alignedbox
{\dodoubleempty\doalignedbox[]}
diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex
index c325f2279..8c4da5ecc 100644
--- a/tex/context/base/core-des.tex
+++ b/tex/context/base/core-des.tex
@@ -656,7 +656,7 @@
\else % Why was this strange expansion needed?
\edef\!!stringa{\showdnpuretext}% nog eens testen binnen \expanded
\expanded{\doattributes{\??dd\currentdescription}\noexpand\c!headstyle\noexpand\c!headcolor
- {\noexpand\descriptionparameter\c!command{\!!stringa}}}%
+ {\noexpand\descriptionparameter\noexpand\c!command{\!!stringa}}}%
\doifnot{#1}{-}{\rawreference\s!num{#1}{}}%
\fi}
diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex
index ac55d603d..7053f2bc0 100644
--- a/tex/context/base/core-fig.tex
+++ b/tex/context/base/core-fig.tex
@@ -733,10 +733,6 @@
\or % lokaal,globaal / non empty gebied
\edef\figurepathlist{\f!currentpath\ifx\@@exdirectory\empty\else,\@@exdirectory\fi}%
\fi
-%
-\doifnotmode{\systemmodeprefix\v!first}% first cache, else no lowres etc
- {\ifx\@@excache\empty\else\edef\figurepathlist{\@@excache,\figurepathlist}\fi}%
-%
\ExpandBothAfter\doifinset\v!default\@@exlocation
{\edef\figurepathlist{\figurepathlist,}}% default tex path search
\ifx\@@exfile\empty
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index 78906426d..e08644ea9 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -1207,7 +1207,7 @@
{\limitatetext{#5}{\getvalue{\??li#2\c!maxwidth}}{\unknown}}% % needed !
[]}% normally the destination, catch by gobble
\@@amboxcommand\do@@amposition{#1}{#7}% beware, we pass the pagenumber
- {\ignorespaces\linklisttoelement{#2}{#3}{#6}{#7}{\box0}\unskip}\\}
+ {\ignorespaces\linklisttoelement{#3}{#6}{#7}{\box0}\unskip}\\}
% \scherm moet worden als \page
diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex
index 12f85097b..ba6cb4a9f 100644
--- a/tex/context/base/core-itm.tex
+++ b/tex/context/base/core-itm.tex
@@ -760,16 +760,52 @@
\definecomplexorsimpleempty\item
\definecomplexorsimpleempty\doitemgroupitem
-\def\complexdoitemgrouphead[#1]#2\par% % beter in \complexdosom hangen met een if
+\def\complexhead[#1]#2\par#3\par
+ {\startitemgroup[#1]%
+ \complexdoitemgrouphead[]\ignorespaces#2\par#3\par
+ \stopitemgroup}
+
+% \def\complexdoitemgrouphead[#1]#2\par% % beter in \complexdosom hangen met een if
+% {\iffirstlist\else\doitembreak\allowbreak\fi
+% \ifpackeditems\else\getitemparameter\itemlevel\c!beforehead\fi
+% \iffirstlist\ifitemintro\else\ifcase\itemlevel % incr in \complexdosom
+% \doitembreak\allowbreak
+% \fi\fi\fi
+% \complexdoitemgroupitem[#1]{\doitemattributes\itemlevel\c!headstyle\c!headcolor
+% {\ignorespaces#2}}%
+% \iftextitems
+% \removeunwantedspaces\space\ignorespaces
+% \else
+% \par
+% \fi
+% \doitembreak\nobreak
+% \ifpackeditems\else\getitemparameter\itemlevel\c!afterhead\fi
+% \doitembreak\nobreak
+% \noindentation}
+%
+% the next solution accepts \head test \type{x{x}x} test ...
+
+\def\dostartitemattributes#1{\dostartattributes{\??op\currentitemgroup#1}}
+\def\dostopitemattributes {\dostopattributes}
+
+\def\complexdoitemgrouphead[#1]% beter in \complexdosom hangen met een if
{\iffirstlist\else\doitembreak\allowbreak\fi
\ifpackeditems\else\getitemparameter\itemlevel\c!beforehead\fi
\iffirstlist\ifitemintro\else\ifcase\itemlevel % incr in \complexdosom
- \doitembreak\allowbreak
+ \doitembreak\allowbreak
\fi\fi\fi
- \complexdoitemgroupitem[#1]{\doitemattributes\itemlevel\c!headstyle\c!headcolor
- {\ignorespaces#2}}%
+ \complexdoitemgroupitem[#1]%
+ \bgroup
+ \dostartitemattributes\itemlevel\c!headstyle\c!headcolor\empty
+ \ignorespaces
+ \let\par\enditemhead} % brrrr but simple anyway
+
+\def\enditemhead
+ {\removeunwantedspaces
+ \dostopitemattributes
+ \egroup
\iftextitems
- \removeunwantedspaces\space\ignorespaces
+ \space\ignorespaces
\else
\par
\fi
@@ -778,11 +814,6 @@
\doitembreak\nobreak
\noindentation}
-\def\complexhead[#1]#2\par#3\par
- {\startitemgroup[#1]%
- \complexdoitemgrouphead[]\ignorespaces#2\par#3\par
- \stopitemgroup}
-
\definecomplexorsimpleempty\head
\definecomplexorsimpleempty\doitemgrouphead
diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex
index 0b75d6c3d..10c601786 100644
--- a/tex/context/base/core-job.tex
+++ b/tex/context/base/core-job.tex
@@ -263,6 +263,10 @@
\expandafter\normalend
\fi}
+\def\emergencyend
+ {\writestatus\m!systems{invalid \@EA\string\csname\e!start\v!text\endcsname...\@EA\string\csname\e!stop\v!text\endcsname\space structure}%
+ \stoptext}
+
\def\currentfile{\inputfilename}
\def\doexecutefileonce#1%
diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex
index 43ebcc97c..ffaa98214 100644
--- a/tex/context/base/core-new.tex
+++ b/tex/context/base/core-new.tex
@@ -319,8 +319,11 @@
\def\dostartsetups
{\ifthirdargument\@EA\startsetupsC\else\@EA\startsetupsD\fi}
+% \long\def\dodostartsetups#1#2#3% watch out: not \grabuntil
+% {\dograbuntil#1{\egroup\long\setvalue{\??su#2:#3}}}
+
\long\def\dodostartsetups#1#2#3% watch out: not \grabuntil
- {\dograbuntil#1{\egroup\long\setvalue{\??su#2:#3}}}
+ {\dograbuntil#1{\egroup\dodoglobal\long\setvalue{\??su#2:#3}}} % \doglobal
\def\systemsetupsprefix{*}
@@ -328,9 +331,9 @@
\def\resetsetups[#1]% see x-fo for usage
{\ifundefined{\??su\ifgridsnapping\v!grid\fi:#1}%
- \letbeundefined{\??su:#1}%
+ \dodoglobal\letbeundefined{\??su:#1}%
\else
- \letbeundefined{\??su\ifgridsnapping\v!grid\fi:#1}%
+ \dodoglobal\letbeundefined{\??su\ifgridsnapping\v!grid\fi:#1}%
\fi}
% or
diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex
index 26e1d8eaa..23ab32e7e 100644
--- a/tex/context/base/core-rul.tex
+++ b/tex/context/base/core-rul.tex
@@ -448,6 +448,8 @@
\def\backgroundwidth {\the\hsize}
\def\backgroundheight{\the\vsize}
+% todo: also \def\theforegroundbox{#1}
+
\def\dobackgroundbox#1\background#2\color#3\raster#4\offset#5\corner
#6\radius#7\depth#8\component#9\\%
{\vbox
@@ -953,6 +955,65 @@
%D ...,bottom=\kern0pt,...
%D \stoptyping
+% \def\stoplocalframed
+% {\dontshowcomposition
+% \@@stopframedorientation
+% \ifboxhasformat
+% \ifx\localwidth\v!fit
+% \ifreshapeframebox\doreshapeframedbox\fi
+% \boxhaswidthfalse
+% \else\ifx\localwidth\v!fixed
+% \boxhaswidthfalse
+% \else
+% \resetshapeframebox
+% \fi\fi
+% \else
+% \resetshapeframebox
+% \fi
+% \ifboxhaswidth
+% \wd\framebox\!!widtha
+% \fi
+% \ifboxhasheight
+% \ht\framebox\!!heighta
+% \fi
+% \doifvalue{\@@framed\c!empty}\v!yes
+% {\setbox\scratchbox\null
+% \wd\scratchbox\wd\framebox
+% \ht\scratchbox\ht\framebox
+% \dp\scratchbox\dp\framebox
+% \setbox\framebox\box\scratchbox}%
+% \stopregistercolor
+% \docolorframebox
+% \ifboxhasoffset
+% \dooffsetframebox
+% \fi
+% \ifboxisoverlaid \else
+% \dolocateframebox
+% \fi
+% \ifx\postprocessframebox\relax \else
+% \let\next\postprocessframebox
+% \let\postprocessframebox\relax % prevent nesting
+% \next\framebox
+% \fi
+% \edef\overlaylinecolor{\framedparameter\c!framecolor}%
+% \edef\overlaylinewidth{\the\ruledlinewidth}% \@@...
+% \ifboxhasframe % real or invisible frame
+% \doframedbox
+% \fi
+% \doifvaluesomething{\@@framed\c!background}\dobackedbox
+% \ifx\@@locallocation\v!low
+% \doinlineframedbox
+% \else\ifx\@@locallocation\v!depth
+% \doloweredframedbox
+% \else\ifx\@@locallocation\v!hanging
+% \dohangingframedbox
+% \fi\fi\fi
+% \box\framebox
+% \egroup
+% \egroup}
+%
+% new version, installable handler:
+
\def\stoplocalframed
{\dontshowcomposition
\@@stopframedorientation
@@ -999,17 +1060,110 @@
\doframedbox
\fi
\doifvaluesomething{\@@framed\c!background}\dobackedbox
- \ifx\@@locallocation\v!low
- \doinlineframedbox
- \else\ifx\@@locallocation\v!depth
- \doloweredframedbox
- \else\ifx\@@locallocation\v!hanging
- \dohangingframedbox
- \fi\fi\fi
+ \handleframedlocator\@@locallocation
\box\framebox
\egroup
\egroup}
+\def\installframedlocator#1#2%
+ {\setvalue{\??ol:\c!location:#1}{#2}}
+
+\def\handleframedlocator#1%
+ {\getvalue{\??ol:\c!location:#1}}
+
+\def\doprelocframedbox#1%
+ {\scratchdimen#1\relax
+ \advance\scratchdimen \ruledlinewidth
+ \ifboxhasoffset
+ \advance\scratchdimen \framedparameter\c!offset
+ \fi
+ \scratchskip\ht\framebox
+ \advance\scratchskip-\scratchdimen}
+
+% \ruledhbox
+% {A
+% \framed[width=2cm,align=middle,location=hanging]{location\\equals\\hanging}
+% \framed[width=2cm,align=middle,location=depth] {location\\equals\\depth}
+% \framed[width=2cm,align=middle,location=height] {location\\equals\\height}
+% B}
+% \vskip2cm
+% \ruledhbox
+% {A
+% \framed[width=2cm,align=middle,location=low] {location\\equals\\low}
+% \framed[width=2cm,align=middle,location=line] {location\\equals\\line}
+% \framed[width=2cm,align=middle,location=high] {location\\equals\\high}
+% B}
+% \vskip2cm
+% \ruledhbox
+% {A
+% \framed[width=2cm,align=middle,location=top] {location\\equals\\top}
+% \framed[width=2cm,align=middle,location=bottom] {location\\equals\\bottom}
+% \framed[width=2cm,align=middle,location=lohi] {location\\equals\\lohi}
+% \framed[width=2cm,align=middle,location=middle] {location\\equals\\middle}
+% B}
+
+\installframedlocator \v!hanging % best with strut=no
+ {\dp\framebox\ht\framebox
+ \ht\framebox\zeropoint}
+
+\installframedlocator \v!depth
+ {\scratchdimen\ht\framebox
+ \advance\scratchdimen -\strutdp
+ \ht\framebox\scratchdimen
+ \dp\framebox\strutdp
+ \box\framebox}
+
+\installframedlocator \v!height
+ {\scratchdimen\ht\framebox
+ \advance\scratchdimen -\strutht
+ \ht\framebox\strutht
+ \dp\framebox\scratchdimen
+ \box\framebox}
+
+\installframedlocator \v!high
+ {\doprelocframedbox\strutht
+ \setbox\framebox\hbox{\lower\scratchskip\box\framebox}%
+ \ht\framebox\strutht
+ \dp\framebox\strutdp
+ \hbox{\box\framebox}}
+
+\installframedlocator \v!line
+ {\setbox\framebox\hbox{\lower.5\ht\framebox\box\framebox}%
+ \ht\framebox.5\lineheight
+ \dp\framebox.5\lineheight
+ \hbox{\box\framebox}}
+
+\installframedlocator \v!low
+ {\doprelocframedbox\strutdp
+ \setbox\framebox\hbox{\lower\scratchdimen\box\framebox}%
+ \ht\framebox\strutht
+ \dp\framebox\strutdp
+ \box\framebox}
+
+\installframedlocator \v!top
+ {\doprelocframedbox\strutht
+ \setbox\framebox\hbox{\lower\scratchskip\box\framebox}%
+ \ht\framebox\scratchdimen
+ \dp\framebox\scratchskip
+ \hbox{\box\framebox}}
+
+\installframedlocator \v!middle
+ {\scratchdimen.5\ht\framebox
+ \setbox\framebox\hbox{\lower\scratchdimen\box\framebox}%
+ \ht\framebox\scratchdimen
+ \dp\framebox\scratchdimen
+ \hbox{\box\framebox}}
+
+\installframedlocator \v!lohi
+ {\handleframedlocator\v!middle}
+
+\installframedlocator \v!bottom
+ {\doprelocframedbox\strutdp
+ \setbox\framebox\hbox{\lower\scratchdimen\box\framebox}%
+ \ht\framebox\scratchskip
+ \dp\framebox\scratchdimen
+ \hbox{\box\framebox}}
+
% \let\@@startframedorientation\relax
% \let\@@stopframedorientation \relax
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex
index 310aefd66..74bb7814a 100644
--- a/tex/context/base/core-sec.tex
+++ b/tex/context/base/core-sec.tex
@@ -162,6 +162,9 @@
\dochecknummer{#1}%
\egroup}
+\def\rawsectionnumber#1%
+ {\countervalue{\??se#1}}
+
\def\domakeprecedingsectionnumber[#1]% will become ugly after speed up
{\bgroup % added
\globallet\precedingsectionnumber\empty
diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex
index 2846332f4..24c4f6f1d 100644
--- a/tex/context/base/core-spa.tex
+++ b/tex/context/base/core-spa.tex
@@ -17,7 +17,7 @@
\unprotect
-\newevery \everybodyfont \Everybodyfont % just to be sure
+\newevery \everybodyfont \EveryBodyFont % just to be sure
\newevery \everyfontswitch \EveryFontSwitch % just to be sure
\newevery \everydefinedfont \relax % just to be sure
@@ -159,7 +159,7 @@
\fi
\let\minimumstrutheight \@@itminheight
\let\minimumstrutdepth \@@itmindepth
- \let\minimallinedistance\@@itdistance
+ \let\minimumlinedistance\@@itdistance
\let\normallineheight \@@itline % let ! ! ! ! ! ivm ex
\doifelse\@@ittop\v!height % new, topskip does more bad than good
{\let\topskipfactor \@@itheight}
@@ -1673,7 +1673,7 @@
\def\minimumstrutdepth {0pt}
\def\normallineheight {\baselinefactor ex}
-\def\minimallinedistance {\lineskip}
+\def\minimumlinedistance {\lineskip}
\def\strutheight {0pt}
\def\strutdepth {0pt}
@@ -1771,7 +1771,7 @@
% \normalbaselineskip\openlineheight
% \!!plus\baselinegluefactor\openlineheight
% \!!minus\baselinegluefactor\openlineheight
-% \normallineskip\minimallinedistance\relax % \onepoint\relax
+% \normallineskip\minimumlinedistance\relax % \onepoint\relax
% \normallineskiplimit\zeropoint\relax
% \normalbaselines}
@@ -1805,7 +1805,7 @@
\!!plus \baselinegluefactor\openlineheight
\!!minus\baselinegluefactor\openlineheight
\fi
- \normallineskip\minimallinedistance\relax % \onepoint\relax
+ \normallineskip\minimumlinedistance\relax % \onepoint\relax
\normallineskiplimit\zeropoint\relax
\normalbaselines}
@@ -1833,6 +1833,26 @@
\strutdimen#3\strutdimen % kan afwijken van de globale
\edef#1{\the\strutdimen}} % macro % strut
+%D Sometimes one needs to freeze the interlinespacing
+%D
+%D \starttyping
+%D \rm \freezeinterlinespace .... {\ss \frozeninterlinespace .... \endgraf}
+%D \stoptyping
+
+\let\restoreinterlinespace\relax
+
+\def\saveinterlinespace
+ {\edef\restoreinterlinespace
+ {\lineheight \the\lineheight
+ \openstrutheight \the\openstrutheight
+ \openstrutdepth \the\openstrutdepth
+ \openlineheight \the\openlineheight
+ \normalbaselineskip \the\normalbaselineskip
+ \normallineskip \the\normallineskip
+ \normallineskiplimit\the\normallineskiplimit
+ \noexpand\def\noexpand\normallineheight{\the\dimexpr\normallineheight\relax}%
+ \noexpand\normalbaselines}}
+
% plain definition:
%
% \def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}
@@ -2090,6 +2110,7 @@
\setstrut}
\ifx\setfontparameters\undefined
+ % problems ! ! ! !
\def\setfontparameters{\the\everybodyfont}
\fi
@@ -2187,6 +2208,29 @@
\endETEX
+%D \macros
+%D {keeplinestogether}
+%D
+%D Dirty hack, needed in margin content that can run of a page.
+
+\beginETEX
+
+ \def\keeplinestogether#1%
+ {\xdef\restoreinterlinepenalty{\global\resetpenalties\interlinepenalties}%
+ \global\setpenalties\interlinepenalties{#1}\!!tenthousand}
+
+\endETEX
+
+\beginTEX
+
+ \def\keeplinestogether#1%
+ {\xdef\restoreinterlinepenalty
+ {\global\let\restoreinterlinepenalty\relax
+ \global\interlinepenalty=\the\interlinepenalty}% keep = here
+ \global\interlinepenalty\!!tenthousand}
+
+\endTEX
+
\newif\ifgridsnapping % to be sure
\def\defaultwidowpenalty {2000} % was: 1000
@@ -2649,6 +2693,7 @@
\appendtoks \forgetparindent \to \everyforgetall
\appendtoks \forgetbothskips \to \everyforgetall
\appendtoks \forgetspacing \to \everyforgetall % i.v.m. funny spacing in pagebody
+\appendtoks \spacing\!!plusone \to \everyforgetall % new per 10/08/2004, else problems in otr / !! needed
\appendtoks \everypar\emptytoks \to \everyforgetall % indeed!
\def\localvbox#1#%
@@ -3267,15 +3312,30 @@
%D To prevent unwanted side effects, we also have to check
%D for hyphens here:
+% \def\setraggedness#1%
+% {\ifnum\tolerance<1500\relax % small values have
+% \tolerance1500\relax % unwanted side effects
+% \fi
+% \spaceskip2.5\hsize % we misuse these registers
+% \xspaceskip#1\relax % for temporary storage;
+% \divide\spaceskip \xspaceskip % they are changed anyway
+% \ifx\dohyphens\relax
+% \hyphenpenalty\spaceskip % \else no hyphens is active
+% \fi}
+
+\newskip\@@raggedskipa
+\newskip\@@raggedskipb
+
\def\setraggedness#1%
{\ifnum\tolerance<1500\relax % small values have
\tolerance1500\relax % unwanted side effects
\fi
- \spaceskip2.5\hsize % we misuse these registers
- \xspaceskip#1\relax % for temporary storage;
- \divide\spaceskip \xspaceskip % they are changed anyway
\ifx\dohyphens\relax
- \hyphenpenalty\spaceskip % \else no hyphens is active
+ % this code will be reconsidered / kind of fuzzy (and old)
+ \@@raggedskipa 2.5\hsize
+ \@@raggedskipb #1\relax
+ \divide\@@raggedskipa \@@raggedskipb
+ \hyphenpenalty\@@raggedskipa
\fi}
\let\updateraggedskips\relax
diff --git a/tex/context/base/enco-cyr.tex b/tex/context/base/enco-cyr.tex
index 9ee7f50b0..95ab42231 100644
--- a/tex/context/base/enco-cyr.tex
+++ b/tex/context/base/enco-cyr.tex
@@ -670,7 +670,7 @@
\startmapping[x2]
-\resetcaserange 0 to 255
+\resetcaserange 128 to 255
\definecasemaps 192 to 223 lc +32 uc 0 % base letters (russian)
\definecasemaps 224 to 255 lc 0 uc -32
diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex
index 6e7ae5120..6b32bbf6c 100644
--- a/tex/context/base/enco-ini.tex
+++ b/tex/context/base/enco-ini.tex
@@ -179,12 +179,18 @@
\let\enabledregime\empty
+% \def\enableregime[#1]%
+% {\edef\characterregime{@#1@}%
+% \ifx\enabledregime\characterregime \else
+% \doifdefined{\@reg@\characterregime}
+% {\the\csname\@reg@\characterregime\endcsname}%
+% \let\enabledregime\characterregime
+% \fi}
+
\def\enableregime[#1]%
{\edef\characterregime{@#1@}%
\ifx\enabledregime\characterregime \else
- \doifdefined{\@reg@\characterregime}
- {\the\csname\@reg@\characterregime\endcsname}%
- \let\enabledregime\characterregime
+ \the\executeifdefined{\@reg@\characterregime}\emptytoks
\fi}
%D \macros
@@ -966,6 +972,10 @@
% we need to postpone catcode changes, e.g. hr patterns
% have \catcode" -> which fails when " is letter
+% new patterns, some day
+%
+% \enableregime[utf]%
+
\def\pathypsettings
{\ifx \enablepatterntokens\undefined
\defineactivecharacter [ {\handlepatterntoken}%
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index f459b99c0..06bf96366 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -2478,17 +2478,17 @@
\normalizebodyfontsize\scratchdimen\to\!!stringa
\letvalue{\??ft#1#2}\!!stringa}}
-\def\dodefineunknownbodyfont#1#2% see ***
- {\doifdefined{\s!default\s!default#2}
- {\donetrue
- \getvalue{\s!default\s!default#2}{#1}{#2}}}
-
-% needs to be as follows, but test first:
-%
% \def\dodefineunknownbodyfont#1#2% see ***
-% {\doifdefined{\s!default\fontclass#2}% was \s!default\s!default (related to change */*)
+% {\doifdefined{\s!default\s!default#2}
% {\donetrue
-% \getvalue{\s!default\fontclass#2}{#1}{#2}}}
+% \getvalue{\s!default\s!default#2}{#1}{#2}}}
+%
+% but ... it needs to be as follows:
+
+\def\dodefineunknownbodyfont#1#2% see ***
+ {\doifdefined{\s!default\fontclass#2}% was \s!default\s!default (related to change */*)
+ {\donetrue
+ \getvalue{\s!default\fontclass#2}{#1}{#2}}}
\def\dodefineunknownsubfont#1#2%
{\doifundefined{\@size@\getvalue{\??ft#1#2}}
@@ -2555,7 +2555,7 @@
%D garantees their handling.
\ifx\everybodyfont\undefined % permits reloading
- \newevery \everybodyfont \Everybodyfont
+ \newevery \everybodyfont \EveryBodyFont
\fi
%D At the system level one can initialize thing like:
@@ -2567,7 +2567,7 @@
%D While users can add their own non standard commands like:
%D
%D \starttyping
-%D \Everybodyfont{\message{changing to bodyfont \the\bodyfontsize}}
+%D \EveryBodyFont{\message{changing to bodyfont \the\bodyfontsize}}
%D \stoptyping
%D
%D Personnaly I never felt the need for such extensions, but
@@ -2682,6 +2682,8 @@
\let\fontstyle = \defaultfontstyle
\let\fontsize = \defaultfontsize
+%D {\em The following approach is obsolete.}
+%D
%D All things related to fonts are grouped into files with
%D names like \type{font-cmr}. These files are loaded by:
@@ -2719,7 +2721,6 @@
% {#2}% argument to \showmessage
% \stopreadingfile}}
-
%D When \type {\loadfontfileoncetrue}, such files are
%D only loaded once! This permits redundant loading, but at
%D the same time forced grouping when we want continuously mix
@@ -2801,12 +2802,13 @@
%D sequence of a session. After the loading job is done, the
%D macro relaxes itself and reset the signal.
-\def\preloadfonts
+\def\preloadfonts % never called, needs a clean up
{\showmessage\m!fonts6{\normalizedbodyfontsize\normalspace\fontstyle}%
\global\loadingfontsfalse
\doswitchpoints[\normalizedbodyfontsize]%
\doswitchstyle[\fontstyle]%
\the\everybodyfont
+ \saveinterlinespace
\global\let\preloadfonts\relax}
% \prependtoks \preloadfonts \to \everydump % saves .1 s on a DELL P60 - 2GHZ
@@ -3328,12 +3330,16 @@
%D Both macros look alike. The second one also has to take
%D all kind of keywords into account.
+\ifx\saveinterlinespace \undefined \let\saveinterlinespace \relax \fi
+\ifx\restoreinterlinespace\undefined \let\restoreinterlinespace\relax \fi
+
\chardef\bodyfontsetstate=0
\definecomplexorsimple\setupbodyfont
\def\simplesetupbodyfont
- {\restoreglobalbodyfont}
+ {\restoreglobalbodyfont
+ \saveinterlinespace}
\def\complexsetupbodyfont[#1]%
{\doifsomething{#1}
@@ -3343,6 +3349,7 @@
\let\globalfontstyle\fontstyle
\ifloadingfonts\else
\the\everybodyfont % indeed needed in case \dosetfont is not executed
+ \saveinterlinespace
\fi}}
\unexpanded\def\switchtobodyfont[#1]%
@@ -3452,8 +3459,11 @@
%D The next auxilliary macro is an alternative to \type
%D {\fontname}.
-\def\purefontname#1%
- {\expandafter\splitoffpurefontname\fontname#1 \\}
+% \def\purefontname#1{\expandafter\splitoffpurefontname\fontname#1 \\}
+%
+% extra level is needed:
+
+\def\purefontname#1{\@EA\splitoffpurefontname\@EA{\@EA{\@EA\unstringed\fontname#1}} \\}
\def\splitoffpurefontname#1 #2\\{#1}
@@ -3587,12 +3597,13 @@
\doswitchstyle[\fontstyle]}
\unexpanded\def\setsmallbodyfont{\setbodyfontstep\v!small\the\everybodyfont}
-\unexpanded\def\setbigbodyfont {\setbodyfontstep\v!big\the\everybodyfont}
+\unexpanded\def\setbigbodyfont {\setbodyfontstep\v!big \the\everybodyfont}
\unexpanded\def\setmainbodyfont
{\doswitchpoints[\normalizedbodyfontsize]%
\doswitchstyle[\fontstyle]%
- \the\everybodyfont}
+ \the\everybodyfont
+ \saveinterlinespace}
%D \macros
%D {restoreglobalbodyfont}
@@ -3612,14 +3623,16 @@
\doswitchpoints[\normalizedglobalbodyfontsize]%
\doswitchstyle[\globalfontstyle]%
\redoconvertfont % just in case a pagebreak occurs
- \tf \the\everybodyfont}
+ \tf \the\everybodyfont
+ \saveinterlinespace}
\def\partialrestoreglobalbodyfont
{\let\fontsize\defaultfontsize
\let\fontbody\defaultfontbody
\chardef\currentxfontsize\zerocount
\redoconvertfont
- \tf}
+ \tf
+ \saveinterlinespace}
\def\restoreglobalbodyfont % ook style etc
{\ifx\fontclass\globalfontclass
diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex
index 7a7b14c09..ec4984baf 100644
--- a/tex/context/base/lang-ini.tex
+++ b/tex/context/base/lang-ini.tex
@@ -311,8 +311,12 @@
% better:
\let\synchronizepatterns\relax % needed?
\let\enabledmapping \empty % needed?
+ % old (original) patterns
\doifelsenothing{#3}{\enableencoding[\s!default]}{\enableencoding[#3]}%
\doifelsenothing{#4}{\enablemapping [\s!default]}{\enablemapping [#4]}%
+ % new patterns
+ % \enableregime[utf]%
+ %
\ifundefined{\??la\??la:\currentencoding:\currentmapping:#2}%
\let\showpatterns\relax
\edef\alreadyloadedlanguage
diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex
index 5e8410ed3..91a552b96 100644
--- a/tex/context/base/mult-sys.tex
+++ b/tex/context/base/mult-sys.tex
@@ -546,6 +546,7 @@
\definesystemvariable {sn} % SubNummer
\definesystemvariable {so} % SOrteren
\definesystemvariable {sp} % SelecteerPapier
+\definesystemvariable {sr} % SpacehandleR
\definesystemvariable {ss} % Symbool
\definesystemvariable {st} % STickers
\definesystemvariable {su} % SetUp
diff --git a/tex/context/base/page-imp.tex b/tex/context/base/page-imp.tex
index 1525f3784..e36d90777 100644
--- a/tex/context/base/page-imp.tex
+++ b/tex/context/base/page-imp.tex
@@ -134,7 +134,7 @@
\newcount\shippedoutpages
\let\pagestoshipout\empty % {1,3,6}
-\chardef\whichpagetoshipout=0 % 0=all 1=odd 2=even
+\chardef\whichpagetoshipout=0 % 0=all 1=odd 2=even
\def\actualshipout#1%
{\global\advance\shippedoutpages\plusone
diff --git a/tex/context/base/page-ini.tex b/tex/context/base/page-ini.tex
index ffe29c4e3..f309761fe 100644
--- a/tex/context/base/page-ini.tex
+++ b/tex/context/base/page-ini.tex
@@ -969,6 +969,8 @@
\afterfinaloutput
\popproperties} % ... and here
+% beware: \ifverwerken is in use
+
\def\finaloutput#1#2%
{\checkpageversion
\ifverwerken
@@ -1870,8 +1872,8 @@
\def\doprocesspage[#1][#2]%
{\processaction
[#2]
- [ \v!yes=>\global\verwerkentrue,
- \v!no=>\global\verwerkenfalse]%
+ [\v!yes=>\global\verwerkentrue,
+ \v!no=>\global\verwerkenfalse]%
\gdef\selectie{#1}%
\global\selecterentrue
\global\geselecteerdfalse}
diff --git a/tex/context/base/page-lin.tex b/tex/context/base/page-lin.tex
index b31e46b58..83f8d3608 100644
--- a/tex/context/base/page-lin.tex
+++ b/tex/context/base/page-lin.tex
@@ -34,8 +34,8 @@
\whitespace
%\page[\v!preference]} gaat mis na koppen, nieuw: later \nobreak
\begingroup
- \def\@@rgstepyes{\parindent\zeropoint}%
- \def\@@rgstepno {\parindent\zeropoint}%
+ \def \@@rgstepyes {\parindent\zeropoint}%
+ \def \@@rgstepno {\parindent\zeropoint}%
\edef\@@rgparindent{\the\parindent}%
\globallet\@@rglinesteptoggle\!!plusone
\processaction
@@ -71,13 +71,47 @@
\@@rgstepno
\fi
\futurelet\next\dobetweenthelines}%
- % new
- \processaction
- [\@@rgspace]
- [ \v!on=>\obeyspaces\def\obeyedspace{\mathortext\normalspace{\dontleavehmode{\tt\controlspace}}},
- \v!yes=>\obeyspaces\def\obeyedspace{\mathortext\normalspace{\dontleavehmode\normalspace}}]%
+ \activatespacehandler\@@rgspace
\GotoPar}
+%D When spacing is active we need to handle commands in
+%D a special way:
+%D
+%D \starttyping
+%D \setuplines[space=on]
+%D
+%D \startlines
+%D Let's talk about this{\ttsl\gobbleoneargument or}that.
+%D \stoplines
+%D
+%D \startlines
+%D Let's talk about this{\getvalue{ttsl}or}that.
+%D \stoplines
+%D \stoptyping
+
+% this is not the natural place
+
+\def\installspacehandler#1#2% needs to set \obeyedspace
+ {\setvalue{\??sr#1}{#2}}
+
+\installspacehandler \v!on
+ {\obeyspaces
+ \def\obeyedspace{\mathortext\normalspace{\dontleavehmode{\tt\controlspace}}}%
+ \let\ =\obeyedspace}
+
+\installspacehandler \v!yes
+ {\obeyspaces
+ \def\obeyedspace{\mathortext\normalspace{\dontleavehmode \normalspace }}%
+ \let\ =\obeyedspace}
+
+\installspacehandler \v!off
+ {\normalspaces
+ \let\obeyedspace\normalspace
+ \let\ \normalspacetoken}
+
+\def\activatespacehandler#1%
+ {\executeifdefined{\??sr#1}{\activatespacehandler\v!off}}
+
% \def\dobetweenthelines%
% {\convertcommand \next \to\!!stringa % very ugly and fuzzy
% \convertargument\obeyedline\to\!!stringb % but needed anyway
diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex
index 8f8ac24c6..42f989cc5 100644
--- a/tex/context/base/page-lyr.tex
+++ b/tex/context/base/page-lyr.tex
@@ -76,16 +76,16 @@
\def\definelayer
{\dodoubleargument\dodefinelayer}
-\def\dodefinelayer[#1][#2]%
+\def\dodefinelayer[#1][#2]% \zeropoint ipv \!!zeropoint
{\setuplayer
[#1]
[\c!doublesided=,\c!preset=,
\c!state=\v!start,\c!direction=\v!normal,\c!option=,
- \c!x=\!!zeropoint,\c!y=\!!zeropoint,\c!position=\v!no,
+ \c!x=\zeropoint,\c!y=\zeropoint,\c!position=\v!no,
\c!line=0,\c!column=0,
\c!width=\nextboxwd,\c!height=\nextboxht,
- \c!offset=\!!zeropoint,\c!rotation=, % geen 0 !
- \c!hoffset=\!!zeropoint,\c!voffset=\!!zeropoint,
+ \c!offset=\zeropoint,\c!rotation=, % geen 0 !
+ \c!hoffset=\zeropoint,\c!voffset=\zeropoint,
\c!dx=\zeropoint,\c!dy=\zeropoint,
\c!location=rb,\c!position=\v!no,\c!page=,
\c!method=\v!overlay,
@@ -486,10 +486,11 @@
\else
\if!!donec\box\else\copy\fi\layerbox % sorry for the delay due to copying
\fi
+ % todo: method=offset => overlayoffset right/down (handy for backgrounds with offset)
\iftracelayers \ruledvbox \else \vbox \fi \if!!donea to \overlayheight \fi
{\hbox \if!!donea to \overlaywidth \fi
{% klopt dit? #3 en niet #2 ?
- \doifvalue{\??ll#3\realfolio\c!position}\v!yes {\xypos{lyr:#3:\realfolio}}%
+ \doifvalue{\??ll#3\realfolio\c!position}\v!yes{\xypos{lyr:#3:\realfolio}}%
\doifoverlayelse{#3}
{\box\nextbox}
{\startlayoutcomponent{l:#3}{layer #3}\box\nextbox\stoplayoutcomponent}%
diff --git a/tex/context/base/page-mar.tex b/tex/context/base/page-mar.tex
index 856849408..4537a2920 100644
--- a/tex/context/base/page-mar.tex
+++ b/tex/context/base/page-mar.tex
@@ -673,6 +673,10 @@
\fi
\egroup}
+\def\setmargincontentpenalties
+ {\getnoflines\margincontentheight
+ \keeplinestogether\noflines}
+
\def\savemargincontentlines
{\bgroup
\advance\margincontentheight \margincontentextralines\lineheight % 1 by default
@@ -696,9 +700,20 @@
\global\chardef\margintextcollected\zerocount
\global\collectedmargintexts\emptytoks}
+% \def\placemargincontent
+% {\ifcase\margintextcollected\else
+% \bgroup
+% \chardef\graphicvadjustmode\zerocount
+% \doflushmargincontents
+% \egroup
+% \fi}
+%
+% font fix:
+
\def\placemargincontent
- {\ifcase\margintextcollected\else
+ {\ifcase\margintextcollected\else % was level check
\bgroup
+ \redoconvertfont % !!
\chardef\graphicvadjustmode\zerocount
\doflushmargincontents
\egroup
diff --git a/tex/context/base/page-mul.tex b/tex/context/base/page-mul.tex
index efeb81194..c68a4dcf2 100644
--- a/tex/context/base/page-mul.tex
+++ b/tex/context/base/page-mul.tex
@@ -144,7 +144,7 @@
%D \interface \type{\openlineheight} \\
%D the lineheight (including \type{\spacing}) \\
%D
-%D \interface \type{\Everybodyfont} \\
+%D \interface \type{\EveryBodyFont} \\
%D communication channel to font switching routines \\
%D
%D \interface \type{\global\settopskip} \\
@@ -380,13 +380,38 @@
\multiply\mcscratchdimen \plustwo
\advance\mcscratchdimen \columntextheight
\ifdim\precolumnboxheight>\zeropoint
- \advance\mcscratchdimen -\precolumnboxheight
+ \advance\mcscratchdimen -\precolumnboxheight
\fi
\settotalinsertionheight
\advance\mcscratchdimen -\totalinsertionheight
\getnoflines\mcscratchdimen
+ % added 30/7/2004
+ \ifnum\layoutlines>\zerocount \ifnum\noflines>\layoutlines
+ \noflines\layoutlines
+ \fi \fi
\nofcolumnlines\noflines}
+% probaby better, test first, don't replace yet
+%
+% \def\getmulticolumnlines
+% {\mcscratchdimen-\columntextoffset
+% \multiply\mcscratchdimen \plustwo
+% % \advance\mcscratchdimen \columntextheight
+% \ifdim\precolumnboxheight>\zeropoint
+% \advance\mcscratchdimen -\precolumnboxheight
+% \fi
+% \settotalinsertionheight
+% \advance\mcscratchdimen -\totalinsertionheight
+% \getnoflines\mcscratchdimen
+% \ifnum\layoutlines>\zerocount
+% \noflines-\noflines
+% \advance\noflines\layoutlines
+% \ifnum\noflines<\zerocount
+% \noflines\zerocount
+% \fi
+% \fi
+% \nofcolumnlines\noflines}
+
\def\setcolumnvsize
{\getmulticolumnlines
\mcscratchdimen\nofcolumnlines\openlineheight
@@ -450,7 +475,8 @@
\break % Sometimes fails
\fi
\appendtoks\topskip1\topskip\to\everybodyfont
- \the\everybodyfont
+ \the\everybodyfont % ugly here
+\saveinterlinespace % uglu here
\initializecolumns\nofcolumns
\hangafter\zerocount
\hangindent\zeropoint
diff --git a/tex/context/base/page-one.tex b/tex/context/base/page-one.tex
index ed4bc11d0..124232868 100644
--- a/tex/context/base/page-one.tex
+++ b/tex/context/base/page-one.tex
@@ -520,10 +520,42 @@
\doinsertfloatinfo
\dochecknextindentation\??bk}
+% \def\OTRONEsomefixdfloat % [#1]
+% {\docheckiffloatfits
+% \ifroomforfloat\else
+% \goodbreak
+% \fi
+% \showmessage\m!floatblocks9\empty
+% \someherefloat} % [#1]
+%
+% better:
+%
+% \dorecurse{50}
+% {[before normal] \input thuan
+% \placefigure{normal}{\framed[height=1cm,width=8cm]{}}
+% \placefigure{normal}{\framed[height=2cm,width=8cm]{}}
+% [before force] \input thuan
+% \placefigure[force]{force}{\framed[height=8cm,width=8cm]{}}}
+
+\chardef\fixedfloatmethod=3
+
\def\OTRONEsomefixdfloat % [#1]
{\docheckiffloatfits
\ifroomforfloat\else
- \goodbreak
+ \ifzeropt\pagetotal
+ % let's assume that there is room
+ \else
+ \ifcase\fixedfloatmethod
+ % disabled
+ \or % 1 (old method)
+ \goodbreak
+ \or % 2 (safe method)
+ \page
+ \or % 3 (keeps in stream)
+ \vskip-.5\floatheight % play safe
+ \vskip\textheight
+ \fi
+ \fi
\fi
\showmessage\m!floatblocks9\empty
\someherefloat} % [#1]
diff --git a/tex/context/base/page-set.tex b/tex/context/base/page-set.tex
index ea3d030a9..76866c563 100644
--- a/tex/context/base/page-set.tex
+++ b/tex/context/base/page-set.tex
@@ -84,11 +84,29 @@
% \startcolumnset [three] \dorecurse {1}{\input tufte \par} \stopcolumnset
% \stoptext
+%D test case of Vit Zika (context list):
+%D
+%D \starttyping
+%D \setuplayout[height=middle,width=middle,grid=yes]
+%D
+%D \starttext
+%D \startcolumnset
+%D \dorecurse{10}
+%D {\input thuan \endgraf
+%D \bgroup
+%D \ss\restoreinterlinespace
+%D \dorecurse{3}{\input hawking \endgraf}
+%D \egroup
+%D \input bryson \endgraf}
+%D \stopcolumnset
+%D \stoptext
+%D \stoptyping
+
\def\OTRSETsetcorrectnofcells#1%
{\bgroup
\!!counta#1\relax
\ifdim\globalbodyfontsize=\localbodyfontsize
- % already ok
+ \restoreinterlinespace
\else
\!!dimena-\!!counta\lineheight
\restoreglobalbodyfont % slow, we need a fast one
@@ -106,7 +124,7 @@
{\bgroup
\!!dimena-\strutht\relax
\ifdim\globalbodyfontsize=\localbodyfontsize
- % already ok
+ \restoreinterlinespace
\else
\restoreglobalbodyfont
\fi
@@ -1349,13 +1367,32 @@
\def\OTRSETstoreincolumnslotUNKNOWN#1%
{\OTRSETprepareforcolumnslot2{#1}\copy#1} % {} ?
+% \def\OTRSETprepareforcolumnslot#1#2% 1=hoog 2=midden 3=laag
+% {\dp#2\zeropoint
+% \ifcase\columnslotspacing\else
+% \scratchdimen\columnslotspacing\lineheight
+% \ifnum#1=2 \scratchdimen2\scratchdimen \fi
+% \setbox#2\vbox spread \scratchdimen
+% {\ifnum#1>1\vss\fi\box#2\relax\ifnum#1<3\vss\fi}%
+% \fi}
+
\def\OTRSETprepareforcolumnslot#1#2% 1=hoog 2=midden 3=laag
{\dp#2\zeropoint
\ifcase\columnslotspacing\else
\scratchdimen\columnslotspacing\lineheight
\ifnum#1=2 \scratchdimen2\scratchdimen \fi
- \setbox#2\vbox spread \scratchdimen
- {\ifnum#1>1\vss\fi\box#2\relax\ifnum#1<3\vss\fi}%
+ \begingroup
+ \advance\scratchdimen\ht#2\relax
+ \ifdim\scratchdimen<\columnmaxcells\lineheight
+ \endgroup \setbox#2\vbox spread \scratchdimen \bgroup
+ \else
+ \endgroup \setbox#2\vbox to \columnmaxcells\lineheight \bgroup
+ \vskip\strutdepth
+ \fi
+ \ifnum#1>1\vss\fi
+ \box#2\relax
+ \ifnum#1<3\vss\fi
+ \egroup
\fi}
\def\OTRSETdocheckiffloatfits % eigenlijk moet else float anders
@@ -1673,6 +1710,7 @@
\global\chardef\OTRSETfinish\zerocount
\ifnum\columnsetlevel=\plusone
\bgroup
+ \saveinterlinespace
\globallet\columnsetpage\!!plusone
\def\currentcolumnset{#2}%
\insidecolumnstrue % will be different flag
@@ -1805,6 +1843,30 @@
% so this will be changed
+% \def\OTRSETnobalance
+% {\iflastcolumnfootnotes % testen ! optie
+% % inhibit flush of floats !
+% % todo: nothing if no footnotes, else empty page
+% \dostepwiserecurse\mofcolumns\nofcolumns\plusone
+% {\vskip-\struttotal\verticalstrut\vfill\eject}%
+% \else
+% \ifdim\pagetotal>\zeropoint % no, see example **
+% \ifnum\mofcolumns=\nofcolumns
+% \OTRSETflushfinalfootnotes
+% \else
+% % probably todo
+% \fi
+% \vfill
+% \eject
+% % brr, may result in empty page after nicely fit text
+% % or if left, then lost of first column only text
+% \ifnum\mofcolumns>1
+% \OTRSETdofinalflush
+% \OTRSETdofinaloutput
+% \fi
+% \fi
+% \fi}
+
\def\OTRSETnobalance
{\iflastcolumnfootnotes % testen ! optie
% inhibit flush of floats !
@@ -1812,7 +1874,14 @@
\dostepwiserecurse\mofcolumns\nofcolumns\plusone
{\vskip-\struttotal\verticalstrut\vfill\eject}%
\else
- \ifdim\pagetotal>\zeropoint % no, see example **
+ \ifnum\mofcolumns>\plusone
+ \donetrue
+ \else\ifdim\pagetotal>\zeropoint % too dangerous, we loose data
+ \donetrue
+ \else
+ \donefalse
+ \fi\fi
+ \ifdone
\ifnum\mofcolumns=\nofcolumns
\OTRSETflushfinalfootnotes
\else
@@ -1822,7 +1891,7 @@
\eject
% brr, may result in empty page after nicely fit text
% or if left, then lost of first column only text
- \ifnum\mofcolumns>1
+ \ifnum\mofcolumns>\plusone
\OTRSETdofinalflush
\OTRSETdofinaloutput
\fi
@@ -1876,9 +1945,10 @@
\egroup}}
\OTRSEToutput
- {\OTRSETnaturalflush
+ {\dontcomplain % new, get rid of overfull message (to be sorted out)
+ \OTRSETnaturalflush
%\OTRSETstartnextpage
- \OTRSETdoflushfloats % zou eigenlijk in \flushsavedfloats moeten (gaat fout)
+ \OTRSETdoflushfloats % actually belongs in \flushsavedfloats (but goes wrong)
\OTRSETcheckfreelines
\OTRSETchecksidefloat}
diff --git a/tex/context/base/s-pre-00.tex b/tex/context/base/s-pre-00.tex
index 8e3eefc23..7b22e2fd9 100644
--- a/tex/context/base/s-pre-00.tex
+++ b/tex/context/base/s-pre-00.tex
@@ -48,7 +48,7 @@
[\vbox to \textheight
{\dopresentationstep1\box\presentationstack\vfill}]}
-\def\presentationstep%
+\def\presentationstep
{\dopresentationstep0}
\def\dopresentationstep#1% not ok yet
@@ -79,7 +79,7 @@
\definesymbol
[\presentationtag]
[\presentationshade]
- \def\presentationshade%
+ \def\presentationshade
{\presentationshield
[\c!width=\textwidth,\c!height=\presentationstepheight]{}}
\definefield[\presentationtag][check][presentation][\presentationtag,\v!none][\presentationtag]
diff --git a/tex/context/base/s-pre-60.tex b/tex/context/base/s-pre-60.tex
index 8170e5a22..baedffaa3 100644
--- a/tex/context/base/s-pre-60.tex
+++ b/tex/context/base/s-pre-60.tex
@@ -80,6 +80,7 @@
\setupinteraction
[openaction=SetupStepper,
+ closeaction=ResetStepper,
openpageaction=CheckStepper,
closepageaction=ResetStepper]
diff --git a/tex/context/base/s-pre-61.tex b/tex/context/base/s-pre-61.tex
index 59c21202e..4e772a0ce 100644
--- a/tex/context/base/s-pre-61.tex
+++ b/tex/context/base/s-pre-61.tex
@@ -142,10 +142,20 @@
StopPage ;
\stopuniqueMPgraphic
-\NormalizeFontHeight \HeadFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
-\NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {2.0\headerheight} {SansBold}
-\NormalizeFontHeight \SubTitleFont {\setstrut\strut\quad} {1.5\headerheight} {SansBold}
-\NormalizeFontHeight \SubSubTitleFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+% this needs to be sorted out !
+
+\appendtoks
+ \NormalizeFontHeight \HeadFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+ \NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {2.0\headerheight} {SansBold}
+ \NormalizeFontHeight \SubTitleFont {\setstrut\strut\quad} {1.5\headerheight} {SansBold}
+ \NormalizeFontHeight \SubSubTitleFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+\to \everystarttext
+\appendtoks
+ \NormalizeFontHeight \HeadFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+ \NormalizeFontHeight \TitleFont {\setstrut\strut\quad} {2.0\headerheight} {SansBold}
+ \NormalizeFontHeight \SubTitleFont {\setstrut\strut\quad} {1.5\headerheight} {SansBold}
+ \NormalizeFontHeight \SubSubTitleFont {\setstrut\strut\quad} {1.0\headerheight} {SansBold}
+\to \everystoptext
\setuphead
[chapter]
@@ -170,7 +180,7 @@
\setupitemize
[each]
- [loose,serried,joinedup]
+ [loose,serried,joinedup,broad]
[symbol=emdash]
\setupalign
@@ -209,6 +219,8 @@
\doifnotmode{demo}{\endinput}
+\starttext
+
\TitlePage{Stepwise\\Refinement}
\Topics{Topics}
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index 2f81610d2..56fd9342c 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -207,6 +207,7 @@
%D This token register is flushed before an ximage is loaded.
\newevery \everyPDFximage \relax
+\let \everyPDFxform \everyPDFximage
%D \macros
%D {dosetuppaper}
@@ -970,6 +971,7 @@
% resources end up there; otherwise transparencies
% won't work in xforms; some day I will optimize
% this.
+ \the\everyPDFxform
\immediate\pdfxform
resources {\currentPDFresources\the\pdfpageresources}%
\nextbox
@@ -1006,6 +1008,7 @@
\setbox\nextbox\vbox\bgroup
\def\dodostopobject
{\egroup
+ \the\everyPDFxform
\pdfform\nextbox
\dosetobjectreference{#1}{#2}{\the\pdflastform}}}
diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex
index a4041ad65..cd0c48150 100644
--- a/tex/context/base/supp-fil.tex
+++ b/tex/context/base/supp-fil.tex
@@ -650,9 +650,33 @@
\def\splitoffroot{.} \chardef\splitoffkind\zerocount
+% \def\splitfilename#1%
+% {\edef\splitofffull{#1}% normally outside this call: \sanitizefilename#1\to\sanitizedfilename
+% \greedysplitstring\splitofffull\at/\to\splitoffpath\and\splitoffbase
+% \ifx\splitoffbase\empty
+% \let\splitoffpath\empty
+% \let\splitoffbase\splitofffull
+% \fi
+% \greedysplitstring\splitoffbase\at.\to\splitoffname\and\splitofftype
+% \chardef\splitoffkind % can be used to test if pathpart was empty
+% \ifx\splitoffpath\empty \zerocount \else
+% \ifx\splitoffpath\splitoffroot \plusone \else
+% \plustwo \fi\fi
+% \ifx\splitoffname\empty\let\splitoffname\splitoffbase\fi
+% \ifx\splitoffpath\empty\let\splitoffpath\splitoffroot\fi}
+%
+% better, since it also handles leading /'s
+%
+% \splitfilename{oeps/test.pdf} [\splitoffpath\quad\splitoffname\quad\splitofftype]
+% \splitfilename{/oeps/test.pdf} [\splitoffpath\quad\splitoffname\quad\splitofftype]
+% \splitfilename{/test.pdf} [\splitoffpath\quad\splitoffname\quad\splitofftype]
+
\def\splitfilename#1%
{\edef\splitofffull{#1}% normally outside this call: \sanitizefilename#1\to\sanitizedfilename
\greedysplitstring\splitofffull\at/\to\splitoffpath\and\splitoffbase
+ \ifx\splitoffpath\splitofffull
+ \let\splitoffpath\empty
+ \fi
\ifx\splitoffbase\empty
\let\splitoffpath\empty
\let\splitoffbase\splitofffull
diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex
index 184cfb815..4ef82cdb7 100644
--- a/tex/context/base/supp-pdf.tex
+++ b/tex/context/base/supp-pdf.tex
@@ -1248,41 +1248,42 @@
\def\MPreadjustdimen % acts on \MPscratchDim and MPscratchCnt
{\ifcase\MPscratchCnt
- \multiply\MPscratchDim 4
+ \multiply\scratchdimen 4
\or
- \multiply\MPscratchDim 2
+ \multiply\scratchdimen 2
\else
\expandafter\doMPreadjustdimen
\fi}
\def\doMPreadjustdimen
- {\ifnum\MPscratchCnt > 2
- \divide\MPscratchDim 2
+ {\ifnum\MPscratchCnt>2
+ \divide\scratchdimen 2
\advance\MPscratchCnt \minusone
\expandafter\doMPreadjustdimen
\fi}
\def\MPreciprocaldeterminant
- {\MPscratchDim\withoutpt\the\dimen0 \dimen6 % s_x*s_y
- \advance\MPscratchDim - \withoutpt\the\dimen2 \dimen4 % s_x*s_y - r_x*r_y
- \ifdim\MPscratchDim<\zeropoint % we need a positive dimension
- \MPscratchDim-\MPscratchDim % for \MPadjustdimen
+ {\scratchdimen\withoutpt\the\dimen0 \dimen6 % s_x*s_y
+ \advance\scratchdimen - \withoutpt\the\dimen2 \dimen4 % s_x*s_y - r_x*r_y
+ \ifdim\scratchdimen<\zeropoint % we need a positive dimension
+ \scratchdimen-\scratchdimen % for \MPadjustdimen (?)
\doMPreciprocal
- \MPscratchDim-\MPscratchDim
+ \scratchdimen-\scratchdimen
\else
\doMPreciprocal
- \fi}
+ \fi
+ \edef\MPreciprocal{\withoutpt\the\scratchdimen}}
\newcount\MPnumerator \MPnumerator = 1073741824 % 2^{30}
% todo: dimexpr
-\def\doMPreciprocal % replace \MPscratchDim with its reciprocal
- {\ifdim\MPscratchDim=\onepoint \else
+\def\doMPreciprocal % replace \scratchdimen with its reciprocal
+ {\ifdim\scratchdimen=\onepoint \else
\MPadjustdimen
\scratchcounter\MPnumerator
- \divide\scratchcounter\MPscratchDim
- \MPscratchDim1\scratchcounter % 1 needed !
+ \divide\scratchcounter\scratchdimen
+ \scratchdimen1\scratchcounter % 1 needed !
\MPreadjustdimen
\fi}
@@ -1579,6 +1580,21 @@
%D
%D If this should ever cause problems, the scale factors can be reduced.
+% \def\doMPconcat#1#2#3#4%
+% {\dimen12=#1pt % p_x % #1\onepoint
+% \dimen14=#3pt % p_y % #3\onepoint
+% \advance\dimen12 -\dimen8 % p_x - t_x
+% \advance\dimen14 -\dimen10 % p_y - t_y
+% \dimen18=\withoutpt\the\dimen6 \dimen12 % s_y(p_x - t_x)
+% \advance\dimen18 -\withoutpt\the\dimen4 \dimen14 % - r_y(p_y-t_y)
+% \dimen14=\withoutpt\the\dimen0 \dimen14 % s_x(p_y-t_y)
+% \advance\dimen14 -\withoutpt\the\dimen2 \dimen12 % - r_x(p_x-t_x)
+% % \MPscratchDim contains precomputed 1/D:
+% \dimen18=\withoutpt\the\MPscratchDim \dimen18
+% \dimen14=\withoutpt\the\MPscratchDim \dimen14
+% \edef#2{\withoutpt\the\dimen18}% % p_x^\prime
+% \edef#4{\withoutpt\the\dimen14}} % p_y^\prime
+
\def\doMPconcat#1#2#3#4%
{\dimen12=#1pt % p_x % #1\onepoint
\dimen14=#3pt % p_y % #3\onepoint
@@ -1588,12 +1604,22 @@
\advance\dimen18 -\withoutpt\the\dimen4 \dimen14 % - r_y(p_y-t_y)
\dimen14=\withoutpt\the\dimen0 \dimen14 % s_x(p_y-t_y)
\advance\dimen14 -\withoutpt\the\dimen2 \dimen12 % - r_x(p_x-t_x)
- % \MPscratchDim contains precomputed 1/D:
- \dimen18=\withoutpt\the\MPscratchDim \dimen18
- \dimen14=\withoutpt\the\MPscratchDim \dimen14
+ % \MPreciprocal contains precomputed 1/D:
+ \dimen18=\MPreciprocal\dimen18
+ \dimen14=\MPreciprocal\dimen14
\edef#2{\withoutpt\the\dimen18}% % p_x^\prime
\edef#4{\withoutpt\the\dimen14}} % p_y^\prime
+% faster but not that often used
+%
+% \def\doMPconcat#1#2#3#4%
+% {\dimen12\dimexpr#1\points-\dimen 8\relax % p_x-t_x
+% \dimen14\dimexpr#3\points-\dimen10\relax % p_y-t_y
+% \dimen18\dimexpr\withoutpt\the\dimen6\dimen12-\withoutpt\the\dimen4\dimen14\relax % s_y(p_x-t_x)-r_y(p_y-t_y)
+% \dimen14\dimexpr\withoutpt\the\dimen0\dimen14-\withoutpt\the\dimen2\dimen12\relax % s_x(p_y-t_y)-r_x(p_x-t_x)
+% \edef#2{\withoutpt\the\dimexpr\MPreciprocal\dimen18\relax}% % p_x^\prime
+% \edef#4{\withoutpt\the\dimexpr\MPreciprocal\dimen14\relax}} % p_y^\prime
+
%D One reason for Daniel to write this patch was that at small sizes
%D the accuracy was less than optimal. Here is a test that demonstrates
%D that his alternative is pretty good:
diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex
index a87e5e272..50a8792e0 100644
--- a/tex/context/base/syst-ext.tex
+++ b/tex/context/base/syst-ext.tex
@@ -638,8 +638,11 @@
\endTEX
+\def\expandrecursecontent
+ {\csname\@@arecurse\recursedepth\endcsname}
+
\def\redostepwiserecurse
- {\csname\@@arecurse\recursedepth\endcsname\dodostepwiserecurse}
+ {\expandrecursecontent\dodostepwiserecurse}
\beginETEX \numexpr
@@ -668,7 +671,7 @@
\endTEX
\def\redostepwisereverse
- {\csname\@@arecurse\recursedepth\endcsname\dodostepwisereverse}
+ {\expandrecursecontent\dodostepwisereverse}
\def\exitstepwiserecurse
{\nodostepwiserecurse\relax}
@@ -752,7 +755,7 @@
\endTEX
\def\redorecurse
- {\csname\@@arecurse\recursedepth\endcsname\dodorecurse}
+ {\expandrecursecontent\dodorecurse}
\def\nodorecurse#1#2#3%
{\@EA\let\@EA\recurselevel\csname\@@irecurse\recursedepth\endcsname
@@ -897,7 +900,7 @@
\endTEX
\def\redoloop
- {\csname\@@arecurse\recursedepth\endcsname\endofloop}
+ {\expandrecursecontent\endofloop}
\def\nodoloop#1%
{\let\endofloop\dodoloop % new, permits nested \doloop's
@@ -2442,21 +2445,23 @@
\fi}%
\@EA\dosplitstring#1\empty\empty\empty#2\empty\empty\empty\\}
-\def\greedysplitstring#1\at#2\to#3\and#4%
- {\edef\asciib{#1}%
- \let\asciic\asciib
- \let#3\empty
- \let#4\empty
- \doloop
- {\expandafter\splitstring\asciib\at#2\to\asciia\and\asciib
- \ifx\asciib\empty
- \exitloop
- \else
- \edef#3{\ifx#3\empty\else#3#2\fi\asciia}%
- \let#4\asciib
- \fi}%
- \ifx#3\empty\let#3\asciic\fi}
-
+% Ok, but not for all cases:
+%
+% \def\greedysplitstring#1\at#2\to#3\and#4%
+% {\edef\asciib{#1}%
+% \let\asciic\asciib
+% \let#3\empty
+% \let#4\empty
+% \doloop
+% {\expandafter\splitstring\asciib\at#2\to\asciia\and\asciib
+% \ifx\asciib\empty
+% \exitloop
+% \else
+% \edef#3{\ifx#3\empty\else#3#2\fi\asciia}%
+% \let#4\asciib
+% \fi}%
+% \ifx#3\empty\let#3\asciic\fi}
+%
% The next one is some 25\% faster, but it hardly matters because
% we seldom use this macro.
%
@@ -2475,6 +2480,25 @@
% \fi}%
% \dogreedysplitstring
% \ifx#3\empty\let#3\asciic\fi}
+%
+% The better alternative:
+
+\def\greedysplitstring#1\at#2\to#3\and#4%
+ {\edef\asciib{#1}%
+ \let\asciic\asciib
+ \let#3\empty
+ \let#4\empty
+ \doloop
+ {\expandafter\splitstring\asciib\at#2\to\asciia\and\asciib
+ \ifx\asciib\empty
+ \exitloop
+ \else
+ % not \edef#3{\ifx#3\empty\else#3#2\fi\asciia} else
+ % /root/path fails because then #3==empty
+ \edef#3{\ifcase\recurselevel\or\else#3#2\fi\asciia}%
+ \let#4\asciib
+ \fi}%
+ \ifx#3\empty\let#3\asciic\fi}
%D \macros
%D {beforetestandsplitstring,
diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex
index fb0200613..5c2f21c99 100644
--- a/tex/context/base/syst-new.tex
+++ b/tex/context/base/syst-new.tex
@@ -780,4 +780,33 @@
%D \test{1,,3,,4,,5,,8,,10,,11,}
%D \stoplines
+%D \macros
+%D {stripstring}
+%D
+%D Needed in bookmarks:
+%D
+%D \starttyping
+%D {\sanitizePDFdocencoding test \CONTEXT\ test \to\oeps\stripstring\oeps\tttf[\oeps]}
+%D \stoptyping
+
+\def\stripstring#1% #1 is \cs
+ {\bgroup
+ \convertcommand#1\to\ascii
+ \global\let\globalascii\empty
+ \donefalse
+ \expandafter\handletokens\ascii\with\dostripstring
+ \egroup
+ \let#1\globalascii}
+
+\def\dostripstring#1%
+ {\ifx#1\blankspace
+ \donetrue
+ \else
+ \ifdone\ifx\globalascii\empty\else
+ \xdef\globalascii{\globalascii\space}%
+ \donefalse
+ \fi\fi
+ \xdef\globalascii{\globalascii#1}%
+ \fi}
+
\protect \endinput
diff --git a/tex/context/base/type-buy.tex b/tex/context/base/type-buy.tex
index c9300a473..9bc16c079 100644
--- a/tex/context/base/type-buy.tex
+++ b/tex/context/base/type-buy.tex
@@ -811,6 +811,56 @@
\stoptypescript
+
+% ef swift
+%
+% texfont --enc=texnansi --ven=ef --col=swift type-buy.dat
+
+\starttypescript [map] [swift] [ec,texnansi]
+ \loadmapfile[\typescriptthree-itc-bauhaus.map]
+\stoptypescript
+
+\starttypescript [serif] [swift] [ec,texnansi]
+
+ \loadmapfile[\typescriptthree-ef-swift.map]
+
+ \definefontsynonym[SwiftEF-Light] [\typescriptthree-swlt] [encoding=\typescriptthree]
+ \definefontsynonym[SwiftEF-Regular] [\typescriptthree-swrg] [encoding=\typescriptthree]
+ \definefontsynonym[SwiftEF-Bold] [\typescriptthree-swbd] [encoding=\typescriptthree]
+ \definefontsynonym[SwiftEF-ExtraBold] [\typescriptthree-swxb] [encoding=\typescriptthree]
+
+ \definefontsynonym[SwiftEF-LightItalic] [\typescriptthree-swlti][encoding=\typescriptthree]
+ \definefontsynonym[SwiftEF-RegularItalic][\typescriptthree-swrgi][encoding=\typescriptthree]
+
+ \definefontsynonym[SwiftEF-BoldCondensed][\typescriptthree-swbdc][encoding=\typescriptthree]
+ \definefontsynonym[SwiftSCEF-Regular] [\typescriptthree-swrgs][encoding=\typescriptthree]
+
+\stoptypescript
+
+\starttypescript [serif] [swift] [name]
+
+ \definefontsynonym [Serif] [SwiftEF-Regular]
+ \definefontsynonym [SerifItalic] [SwiftEF-RegularItalic]
+ \definefontsynonym [SerifSlanted] [SwiftEF-RegularItalic]
+ \definefontsynonym [SerifBold] [SwiftEF-Bold]
+ \definefontsynonym [SerifBoldItalic] [SwiftEF-Bold]
+ \definefontsynonym [SerifBoldSlanted] [SwiftEF-Bold]
+ \definefontsynonym [SerifCaps] [SwiftSCEF-Regular]
+
+\stoptypescript
+
+\starttypescript [serif] [swift-light] [name]
+
+ \definefontsynonym [Serif] [SwiftEF-Light]
+ \definefontsynonym [SerifItalic] [SwiftEF-LightItalic]
+ \definefontsynonym [SerifSlanted] [SwiftEF-LightItalic]
+ \definefontsynonym [SerifBold] [SwiftEF-Regular]
+ \definefontsynonym [SerifBoldItalic] [SwiftEF-RegularItalic]
+ \definefontsynonym [SerifBoldSlanted] [SwiftEF-RegularItalic]
+ \definefontsynonym [SerifCaps] [SwiftSCEF-Regular]
+
+\stoptypescript
+
\stoptypescriptcollection
\endinput
diff --git a/tex/context/base/type-cbg.tex b/tex/context/base/type-cbg.tex
index c3b8fd586..1c041376b 100644
--- a/tex/context/base/type-cbg.tex
+++ b/tex/context/base/type-cbg.tex
@@ -74,13 +74,13 @@
\starttypescript [mono] [cbgreek] [name]
- \definefontsynonym [CBGreek-Mono-Medium-Normal] [gttn1000]
- \definefontsynonym [CBGreek-Mono-Medium-Oblique] [gtto1000]
- \definefontsynonym [CBGreek-Mono-Medium-Italic] [gtti1000]
- \definefontsynonym [CBGreek-Mono-Medium-UprightItalic] [gttu1000]
- \definefontsynonym [CBGreek-Mono-Medium-Caps] [gttc1000]
- \definefontsynonym [CBGreek-Mono-Medium-Leipzig] [gttl1000]
- \definefontsynonym [CBGreek-Mono-Medium-Roman] [gttr1000]
+ \definefontsynonym [CBGreek-Typewriter-Medium-Normal] [gttn1000]
+ \definefontsynonym [CBGreek-Typewriter-Medium-Oblique] [gtto1000]
+ \definefontsynonym [CBGreek-Typewriter-Medium-Italic] [gtti1000]
+ \definefontsynonym [CBGreek-Typewriter-Medium-UprightItalic] [gttu1000]
+ \definefontsynonym [CBGreek-Typewriter-Medium-Caps] [gttc1000]
+ \definefontsynonym [CBGreek-Typewriter-Medium-Leipzig] [gttl1000]
+ \definefontsynonym [CBGreek-Typewriter-Medium-Roman] [gttr1000]
\stoptypescript
diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex
index a520a14da..645956065 100644
--- a/tex/context/base/type-ini.tex
+++ b/tex/context/base/type-ini.tex
@@ -423,6 +423,7 @@
\def\loadallfontmapfiles
{%\message{[\allfontmapsfiles]}%
\ifconditional\resettingmapfile
+ \writestatus\m!fonts{resetting map file list}%
\doresetmapfilelist
\global\setfalse\resettingmapfile
\fi
@@ -450,11 +451,24 @@
\fi}
% since this is driver dependent, and since we may set map files
-% before an output format is defined, we need to postpone it
-
-%appendtoks \loadallfontmapfiles \to \everyPDFximage
-\appendtoks \loadallfontmapfiles \to \everystarttext
-\appendtoks \loadallfontmapfiles \to \everybeforepagebody
+% before an output format is defined, we need to postpone it; we
+% cannot use starttext as hook because an output switch can be part
+% of a style; an alternative is to no longer permit driver switching
+% after the first \starttext, but that will break compatibility
+% because \startcomponent ... \environment ... is pretty legal.
+
+% the map directives need to end up in the right place in the stream
+
+% \appendtoks \loadallfontmapfiles \to \everyPDFximage
+% \appendtoks \loadallfontmapfiles \to \everystarttext
+% \appendtoks \loadallfontmapfiles \to \everybeforepagebody
+
+\everybeforeshipout \expandafter
+ {\expandafter\appendtoks
+ \expandafter\loadallfontmapfiles
+ \expandafter\to
+ \expandafter\pageboundsettings
+ \the\everybeforeshipout}
\newif\ifautoloadmapfiles
diff --git a/tex/context/base/type-pre.tex b/tex/context/base/type-pre.tex
index bb5a55e0f..a1fa0d1cf 100644
--- a/tex/context/base/type-pre.tex
+++ b/tex/context/base/type-pre.tex
@@ -11,6 +11,11 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D This file is obsolete. We now have latin modern and proper
+%D typescripts. Forget about this file.
+
+\endinput
+
%D This file defines some typescripts that simulate the pre-typescript way
%D of defining fonts. This file will not be extended.
diff --git a/tex/context/base/unic-033.tex b/tex/context/base/unic-033.tex
index 5ff0d2e4d..26c5a23d7 100644
--- a/tex/context/base/unic-033.tex
+++ b/tex/context/base/unic-033.tex
@@ -5,25 +5,135 @@
%D subtitle=Vector 33,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%D copyright={PRAGMA / Nikolai Weibull}]
%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.
-\unprotect
+\unprotect
-\startunicodevector 33
- \ifcase\numexpr(#1-34)
- \@@unknownchar \else % TRADE MARK SIGN
- \@@unknownchar
- \fi
-\stopunicodevector
-
-%D For the moment:
+% \startunicodevector 33
+% \@@unknownchar
+% \stopunicodevector
\startunicodevector 33
- \@@unknownchar
+ \expandafter\strippedcsname
+ \ifcase\numexpr(#1-144+1) % space needed, terminates expr
+ \unknownchar \or % hack for getting leftarrow working
+ \leftarrow \or % LEFTWARDS ARROW
+ \uparrow \or % UPWARDS ARROW
+ \rightarrow \or % RIGHTWARDS ARROW
+ \downarrow \or % DOWNWARDS ARROW
+ \leftrightarrow \or % LEFT RIGHT ARROW
+ \updownarrow \or % UP DOWN ARROW
+ \nwarrow \or % NORTH WEST ARROW
+ \nearrow \or % NORTH EAST ARROW
+ \searrow \or % SOUTH EAST ARROW
+ \swarrow \or % SOUTH WEST ARROW
+ \nleftarrow \or % LEFTWARDS ARROW WITH STROKE
+ \nrightarrow \or % RIGHTWARDS ARROW WITH STROKE
+ \unknownchar \or % LEFTWARDS WAVE ARROW
+ \unknownchar \or % RIGHTWARDS WAVE ARROW
+ \twoheadedleftarrow \or % LEFTWARDS TWO HEADED ARROW
+ \unknownchar \or % UPWARDS TWO HEADED ARROW
+ \twoheadedrightarrow\or % RIGHTWARDS TWO HEADED ARROW
+ \unknownchar \or % DOWNWARDS TWO HEADED ARROW
+ \leftarrowtail \or % LEFTWARDS ARROW WITH TAIL
+ \rightarrowtail \or % RIGHTWARDS ARROW WITH TAIL
+ \mapsfrom \or % LEFTWARDS ARROW FROM BAR
+ \unknownchar \or % UPWARDS ARROW FROM BAR
+ \mapsto \or % RIGHTWARDS ARROW FROM BAR
+ \unknownchar \or % DOWNWARDS ARROW FROM BAR
+ \unknownchar \or % UP DOWN ARROW WITH BASE
+ \hookleftarrow \or % LEFTWARDS ARROW WITH HOOK
+ \hookrightarrow \or % RIGHTWARDS ARROW WITH HOOK
+ \loopleftarrow \or % LEFTWARDS ARROW WITH LOOP
+ \looprightarrow \or % RIGHTWARDS ARROW WITH LOOP
+ \unknownchar \or % LEFT RIGHT WAVE ARROW
+ \nleftrightarrow \or % LEFT RIGHT ARROW WITH STROKE
+ \lightning \or % DOWNWARDS ZIGZAG ARROW
+ \Lsh \or % UPWARDS ARROW WITH TIP LEFTWARDS
+ \Rsh \or % UPWARDS ARROW WITH TIP RIGHTWARDS
+ \unknownchar \or % DOWNWARDS ARROW WITH TIP LEFTWARDS
+ \unknownchar \or % DOWNWARDS ARROW WITH TIP RIGHTWARDS
+ \unknownchar \or % RIGHTWARDS ARROW WITH CORNER DOWNWARDS
+ \unknownchar \or % DOWNWARDS ARROW WITH CORNER LEFTWARDS
+ \curveleftarrow \or % ANTICLOCKWISE TOP SEMICIRCLE ARROW
+ \curverightarrow \or % CLOCKWISE TOP SEMICIRCLE ARROW
+ \unknownchar \or % NORTH WEST ARROW TO LONG BAR
+ \unknownchar \or % LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR
+ \circlearrowleft \or % ANTICLOCKWISE OPEN CIRCLE ARROW
+ \circlearrowright \or % CLOCKWISE OPEN CIRCLE ARROW
+ \leftharpoonup \or % LEFTWARDS HARPOON WITH BARB UPWARDS
+ \leftharpoondown \or % LEFTWARDS HARPOON WITH BARB DOWNWARDS
+ \upharpoonright \or % UPWARDS HARPOON WITH BARB RIGHTWARDS
+ \upharpoonleft \or % UPWARDS HARPOON WITH BARB LEFTWARDS
+ \rightharpoonup \or % RIGHTWARDS HARPOON WITH BARB UPWARDS
+ \rightharpoondown \or % RIGHTWARDS HARPOON WITH BARB DOWNWARDS
+ \downharpoonright \or % DOWNWARDS HARPOON WITH BARB RIGHTWARDS
+ \downharpoonleft \or % DOWNWARDS HARPOON WITH BARB LEFTWARDS
+ \rightleftarrows \or % RIGHTWARDS ARROW OVER LEFTWARDS ARROW
+ \unknownchar \or % UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW
+ \leftrightarrows \or % LEFTWARDS ARROW OVER RIGHTWARDS ARROW
+ \leftleftarrows \or % LEFTWARDS PAIRED ARROWS
+ \upuparrows \or % UPWARDS PAIRED ARROWS
+ \rightrightarrows \or % RIGHTWARDS PAIRED ARROWS
+ \downdownarrows \or % DOWNWARDS PAIRED ARROWS
+ \leftrightharpoons \or % LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON
+ \rightleftharpoons \or % RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON
+ \nLeftarrow \or % LEFTWARDS DOUBLE ARROW WITH STROKE
+ \nLeftrightarrow \or % LEFT RIGHT DOUBLE ARROW WITH STROKE
+ \nRightarrow \or % RIGHTWARDS DOUBLE ARROW WITH STROKE
+ \Leftarrow \or % LEFTWARDS DOUBLE ARROW
+ \Uparrow \or % UPWARDS DOUBLE ARROW
+ \Rightarrow \or % RIGHTWARDS DOUBLE ARROW
+ \Downarrow \or % DOWNWARDS DOUBLE ARROW
+ \Leftrightarrow \or % LEFT RIGHT DOUBLE ARROW
+ \Updownarrow \or % UP DOWN DOUBLE ARROW
+ \unknownchar \or % NORTH WEST DOUBLE ARROW
+ \unknownchar \or % NORTH EAST DOUBLE ARROW
+ \unknownchar \or % SOUTH EAST DOUBLE ARROW
+ \unknownchar \or % SOUTH WEST DOUBLE ARROW
+ \Lleftarrow \or % LEFTWARDS TRIPLE ARROW
+ \unknownchar \or % RIGHTWARDS TRIPLE ARROW
+ \leftsquidarrow \or % LEFTWARDS SQUIGGLE ARROW
+ \rightsquidarrow \or % RIGHTWARDS SQUIGGLE ARROW
+ \unknownchar \or % UPWARDS ARROW WITH DOUBLE STROKE
+ \unknownchar \or % DOWNWARDS ARROW WITH DOUBLE STROKE
+ \dashleftarrow \or % LEFTWARDS DASHED ARROW
+ \unknownchar \or % UPWARDS DASHED ARROW
+ \dashrightarrow \or % RIGHTWARDS DASHED ARROW
+ \unknownchar \or % DOWNWARDS DASHED ARROW
+ \unknownchar \or % LEFTWARDS ARROW TO BAR
+ \unknownchar \or % RIGHTWARDS ARROW TO BAR
+ \unknownchar \or % LEFTWARDS WHITE ARROW
+ \unknownchar \or % UPWARDS WHITE ARROW
+ \unknownchar \or % RIGHTWARDS WHITE ARROW
+ \unknownchar \or % DOWNWARDS WHITE ARROW
+ \unknownchar \or % UPWARDS WHITE ARROW FROM BAR
+ \unknownchar \or % UPWARDS WHITE ARROW ON PEDESTAL
+ \unknownchar \or % UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR
+ \unknownchar \or % UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR
+ \unknownchar \or % UPWARDS WHITE DOUBLE ARROW
+ \unknownchar \or % UPWARDS WHITE DOUBLE ARROW ON PEDESTAL
+ \unknownchar \or % RIGHTWARDS WHITE ARROW FROM WALL
+ \unknownchar \or % NORTH WEST ARROW TO CORNER
+ \unknownchar \or % SOUTH EAST ARROW TO CORNER
+ \unknownchar \or % UP DOWN WHITE ARROW
+ \unknownchar \or % RIGHT ARROW WITH SMALL CIRCLE
+ \unknownchar \or % DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW
+ \unknownchar \or % THREE RIGHTWARDS ARROWS
+ \unknownchar \or % LEFTWARDS ARROW WITH VERTICAL STROKE
+ \unknownchar \or % RIGHTWARDS ARROW WITH VERTICAL STROKE
+ \unknownchar \or % LEFT RIGHT ARROW WITH VERTICAL STROKE
+ \unknownchar \or % LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE
+ \unknownchar \or % RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE
+ \unknownchar \or % LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE
+ \leftarrowtriangle \or % LEFTWARDS OPEN-HEADED ARROW
+ \rightarrowtriangle \else % RIGHTWARDS OPEN-HEADED ARROW
+ \leftrightarrowtriangle % LEFT RIGHT OPEN-HEADED ARROW
+ \fi
\stopunicodevector
-\protect \endinput
+\protect \endinput
diff --git a/tex/context/base/unic-034.tex b/tex/context/base/unic-034.tex
new file mode 100644
index 000000000..e43094943
--- /dev/null
+++ b/tex/context/base/unic-034.tex
@@ -0,0 +1,311 @@
+%D \module
+%D [ file=unic-034,
+%D version=2005.05.20,
+%D title=\CONTEXT\ \UNICODE\ Macros,
+%D subtitle=Vector 34,
+%D author=Nikolai Weibull,
+%D date=\currentdate,
+%D copyright={PRAGMA / Nikolai Weibull}]
+
+\unprotect
+
+% TODO NW: everything should be wrapped in \mathematics I suppose...
+% TODO HH: move definitions like this to a default vector
+
+\unexpanded\def\unic@nin {\not\in}
+\unexpanded\def\unic@nni {\not\ni}
+\unexpanded\def\unic@minus {-}
+\unexpanded\def\unic@divisionslash{/}
+\unexpanded\def\unic@cubesqrt {\sqrt^{3}}
+\unexpanded\def\unic@fourthsqrt {\sqrt^{4}}
+\unexpanded\def\unic@divides {\mathop{|}} % TODO
+\unexpanded\def\unic@ndivides {\mathrel{\mathop{\not|}}} % TODO: horrible
+\unexpanded\def\unic@dblint {\int\!\!\int}
+\unexpanded\def\unic@triint {\int\!\!\int\!\!\int}
+\unexpanded\def\unic@ratio {\mathrel{:}}
+\unexpanded\def\unic@proportion {\mathrel{::}}
+\unexpanded\def\unic@nsimeq {\not\simeq}
+\unexpanded\def\unic@napproxeq {\not\approxeq}
+\unexpanded\def\unic@napprox {\not\approx}
+\unexpanded\def\unic@correspondsto{\buildrel \frown \over =}
+\unexpanded\def\unic@estimates {\buildrel \wedge \over =}
+\unexpanded\def\unic@equiangularto{\buildrel \vee \over =}
+\unexpanded\def\unic@stareq {\buildrel \star \over =}
+\unexpanded\def\unic@eqbydef {\buildrel \rm def \over =}
+\unexpanded\def\unic@measuredby {\buildrel \rm m \over =}
+\unexpanded\def\unic@questionedeq {\buildrel \rm ? \over =}
+\unexpanded\def\unic@nequiv {\not\equiv}
+\unexpanded\def\unic@nasymp {\not\asymp}
+\unexpanded\def\unic@nlesssim {\not\lesssim}
+\unexpanded\def\unic@ngtrsim {\not\gtrsim}
+\unexpanded\def\unic@nlessgtr {\not\lessgtr}
+\unexpanded\def\unic@ngtrless {\not\gtrless}
+\unexpanded\def\unic@nsubset {\not\subset}
+\unexpanded\def\unic@nsupset {\not\supset}
+\unexpanded\def\unic@nsqsubseteq {\not\sqsubseteq}
+\unexpanded\def\unic@nsqsupseteq {\not\sqsupseteq}
+
+\startunicodevector 34
+ \expandafter\strippedcsname
+ \ifcase\numexpr(#1+1) % space needed, terminates expr
+ \unknownchar \or % hack for getting forall working
+ \forall \or % FOR ALL
+ \complement \or % COMPLEMENT
+ \partial \or % PARTIAL DIFFERENTIAL
+ \exists \or % THERE EXISTS
+ \nexists \or % THERE DOES NOT EXIST
+ \emptyset \or % EMPTY SET
+ \vartriangle \or % INCREMENT
+ \nabla \or % NABLA
+ \in \or % ELEMENT OF
+ \unic@nin \or % NOT AN ELEMENT OF
+ \unknownchar \or % SMALL ELEMENT OF
+ \ni \or % CONTAINS AS MEMBER
+ \unic@nni \or % DOES NOT CONTAIN AS MEMBER
+ \unknownchar \or % SMALL CONTAINS AS MEMBER
+ \QED \or % END OF PROOF
+ \prod \or % N-ARY PRODUCT
+ \coprod \or % N-ARY COPRODUCT
+ \sum \or % N-ARY SUMMATION
+ \unic@minus \or % MINUS SIGN
+ \mp \or % MINUS-OR-PLUS SIGN
+ \dotplus \or % DOT PLUS
+ \unic@divisionslash \or % DIVISION SLASH
+ \setminus \or % SET MINUS
+ \ast \or % ASTERISK OPERATOR
+ \circ \or % RING OPERATOR
+ \bullet \or % BULLET OPERATOR
+ \sqrt \or % SQUARE ROOT
+ \unic@cubesqrt \or % CUBE ROOT
+ \unic@fourthsqrt \or % FOURTH ROOT
+ \propto \or % PROPORTIONAL TO
+ \infty \or % INFINITY
+ \unknownchar \or % RIGHT ANGLE
+ \angle \or % ANGLE
+ \measuredangle \or % MEASURED ANGLE
+ \sphericalangle \or % SPHERICAL ANGLE
+ \unic@divides \or % DIVIDES
+ \unic@ndivides \or % DOES NOT DIVIDE
+ \parallel \or % PARALLEL TO
+ \nparallel \or % NOT PARALLEL TO
+ \land \or % LOGICAL AND
+ \lor \or % LOGICAL OR
+ \cap \or % INTERSECTION
+ \cup \or % UNION
+ \int \or % INTEGRAL
+ \unic@dblint \or % DOUBLE INTEGRAL
+ \unic@triint \or % TRIPLE INTEGRAL
+ \oint \or % CONTOUR INTEGRAL
+ \unknownchar \or % SURFACE INTEGRAL
+ \unknownchar \or % VOLUME INTEGRAL
+ \unknownchar \or % CLOCKWISE INTEGRAL
+ \unknownchar \or % CLOCKWISE CONTOUR INTEGRAL
+ \unknownchar \or % ANTICLOCKWISE CONTOUR INTEGRAL
+ \therefore \or % THEREFORE
+ \because \or % BECAUSE
+ \unic@ratio \or % RATIO
+ \unic@proportion \or % PROPORTION
+ \unknownchar \or % DOT MINUS
+ \mathop{-\!\!:} \or % EXCESS
+ \mathop{:\!\!\!-\!\!\!:} \or % GEOMETRIC PROPORTION
+ \mathop{\sim\!\!\!:}\or % HOMOTHETIC
+ \sim \or % TILDE OPERATOR
+ \backsim \or % REVERSED TILDE
+ \unknownchar \or % INVERTED LAZY S
+ \unknownchar \or % SINE WAVE
+ \wr \or % WREATH PRODUCT
+ \nsim \or % NOT TILDE
+ \eqsim \or % MINUS TILDE
+ \simeq \or % ASYMPTOTICALLY EQUAL TO
+ \nsimeq \or % NOT ASYMPTOTICALLY EQUAL TO
+ \approxeq \or % APPROXIMATELY EQUAL TO
+ \cong \or % APPROXIMATELY BUT NOT ACTUALLY EQUAL TO
+ \unic@napproxeq \or % NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO
+ \approx \or % ALMOST EQUAL TO
+ \unic@napprox \or % NOT ALMOST EQUAL TO
+ \approxeq \or % ALMOST EQUAL OR EQUAL TO
+ \unknownchar \or % TRIPLE TILDE
+ \unknownchar \or % ALL EQUAL TO
+ \asymp \or % EQUIVALENT TO
+ \Bumpeq \or % GEOMETRICALLY EQUIVALENT TO
+ \bumpeq \or % DIFFERENCE BETWEEN
+ \doteq \or % APPROACHES THE LIMIT
+ \doteqdot \or % GEOMETRICALLY EQUAL TO
+ \fallingdotseq \or % APPROXIMATELY EQUAL TO OR THE IMAGE OF
+ \risingdotseq \or % IMAGE OF OR APPROXIMATELY EQUAL TO
+ \unknownchar \or % COLON EQUALS
+ \unknownchar \or % EQUALS COLON
+ \eqcirc \or % RING IN EQUAL TO
+ \circeq \or % RING EQUAL TO
+ \unic@correspondsto \or % CORRESPONDS TO
+ \unic@estimates \or % ESTIMATES
+ \unic@equiangularto \or % EQUIANGULAR TO
+ \unic@stareq \or % STAR EQUALS
+ \unic@triangleq \or % DELTA EQUAL TO
+ \unic@eqbydef \or % EQUAL TO BY DEFINITION
+ \unic@measuredby \or % MEASURED BY
+ \unic@questionedeq \or % QUESTIONED EQUAL TO
+ \neq \or % NOT EQUAL TO
+ \equiv \or % IDENTICAL TO
+ \unic@nequiv \or % NOT IDENTICAL TO
+ \unknownchar \or % STRICTLY EQUIVALENT TO
+ \leq \or % LESS-THAN OR EQUAL TO
+ \geq \or % GREATER-THAN OR EQUAL TO
+ \leqq \or % LESS-THAN OVER EQUAL TO
+ \geqq \or % GREATER-THAN OVER EQUAL TO
+ \lneqq \or % LESS-THAN BUT NOT EQUAL TO
+ \gneqq \or % GREATER-THAN BUT NOT EQUAL TO
+ \ll \or % MUCH LESS-THAN
+ \gg \or % MUCH GREATER-THAN
+ \between \or % BETWEEN
+ \nasymp \or % NOT EQUIVALENT TO
+ \nless \or % NOT LESS-THAN
+ \ngtr \or % NOT GREATER-THAN
+ \nleq \or % NEITHER LESS-THAN NOR EQUAL TO
+ \ngeq \or % NEITHER GREATER-THAN NOR EQUAL TO
+ \lesssim \or % LESS-THAN OR EQUIVALENT TO
+ \gtrsim \or % GREATER-THAN OR EQUIVALENT TO
+ \unic@nlesssim \or % NEITHER LESS-THAN NOR EQUIVALENT TO
+ \unic@ngtrsim \or % NEITHER GREATER-THAN NOR EQUIVALENT TO
+ \lessgtr \or % LESS-THAN OR GREATER-THAN
+ \gtrless \or % GREATER-THAN OR LESS-THAN
+ \unic@nlessgtr \or % NEITHER LESS-THAN NOR GREATER-THAN
+ \unic@ngtrless \or % NEITHER GREATER-THAN NOR LESS-THAN
+ \prec \or % PRECEDES
+ \succ \or % SUCCEEDS
+ \preceq \or % PRECEDES OR EQUAL TO
+ \succeq \or % SUCCEEDS OR EQUAL TO
+ \precsim \or % PRECEDES OR EQUIVALENT TO
+ \succsim \or % SUCCEEDS OR EQUIVALENT TO
+ \nprec \or % DOES NOT PRECEDE
+ \nsucc \or % DOES NOT SUCCEED
+ \subset \or % SUBSET OF
+ \supset \or % SUPERSET OF
+ \unic@nsubset \or % NOT A SUBSET OF
+ \unic@nsupset \or % NOT A SUPERSET OF
+ \subseteq \or % SUBSET OF OR EQUAL TO
+ \supseteq \or % SUPERSET OF OR EQUAL TO
+ \nsubseteq \or % NEITHER A SUBSET OF NOR EQUAL TO
+ \nsupseteq \or % NEITHER A SUPERSET OF NOR EQUAL TO
+ \subsetneq \or % SUBSET OF WITH NOT EQUAL TO
+ \supsetneq \or % SUPERSET OF WITH NOT EQUAL TO
+ \unknownchar \or % MULTISET
+ \unknownchar \or % MULTISET MULTIPLICATION
+ \biguplus \or % MULTISET UNION
+ \sqsubset \or % SQUARE IMAGE OF
+ \sqsupset \or % SQUARE ORIGINAL OF
+ \sqsubseteq \or % SQUARE IMAGE OF OR EQUAL TO
+ \sqsupseteq \or % SQUARE ORIGINAL OF OR EQUAL TO
+ \sqcap \or % SQUARE CAP
+ \sqcup \or % SQUARE CUP
+ \oplus \or % CIRCLED PLUS
+ \ominus \or % CIRCLED MINUS
+ \otimes \or % CIRCLED TIMES
+ \oslash \or % CIRCLED DIVISION SLASH
+ \odot \or % CIRCLED DOT OPERATOR
+ \circledcirc \or % CIRCLED RING OPERATOR
+ \circledast \or % CIRCLED ASTERISK OPERATOR
+ \unknownchar \or % CIRCLED EQUALS
+ \circleddash \or % CIRCLED DASH
+ \boxplus \or % SQUARED PLUS
+ \boxminus \or % SQUARED MINUS
+ \boxtimes \or % SQUARED TIMES
+ \boxdot \or % SQUARED DOT OPERATOR
+ \vdash \or % RIGHT TACK
+ \dashv \or % LEFT TACK
+ \top \or % DOWN TACK
+ \bot \or % UP TACK
+ \unknownchar \or % ASSERTION
+ \models \or % MODELS
+ \vDash \or % TRUE
+ \unknownchar \or % FORCES
+ \Vvdash \or % TRIPLE VERTICAL BAR RIGHT TURNSTILE
+ \unknownchar \or % DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
+ \nvdash \or % DOES NOT PROVE
+ \nvDash \or % NOT TRUE
+ \unknownchar \or % DOES NOT FORCE
+ \unknownchar \or % NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
+ \unknownchar \or % PRECEDES UNDER RELATION
+ \unknownchar \or % SUCCEEDS UNDER RELATION
+ \lhd \or % NORMAL SUBGROUP OF
+ \rhd \or % CONTAINS AS NORMAL SUBGROUP
+ \unlhd \or % NORMAL SUBGROUP OF OR EQUAL TO
+ \unrhd \or % CONTAINS AS NORMAL SUBGROUP OR EQUAL TO
+ \unknownchar \or % ORIGINAL OF
+ \unknownchar \or % IMAGE OF
+ \unknownchar \or % MULTIMAP
+ \unknownchar \or % HERMITIAN CONJUGATE MATRIX
+ \unknownchar \or % INTERCALATE
+ \veebar \or % XOR
+ \barwedge \or % NAND
+ \unknownchar \or % NOR
+ \unknownchar \or % RIGHT ANGLE WITH ARC
+ \unknownchar \or % RIGHT TRIANGLE
+ \bigwedge \or % N-ARY LOGICAL AND
+ \bigvee \or % N-ARY LOGICAL OR
+ \bigcap \or % N-ARY INTERSECTION
+ \bigcup \or % N-ARY UNION
+ \diamond \or % DIAMOND OPERATOR
+ \cdot \or % DOT OPERATOR
+ \star \or % STAR OPERATOR
+ \divideontimes \or % DIVISION TIMES
+ \bowtie \or % BOWTIE
+ \ltimes \or % LEFT NORMAL FACTOR SEMIDIRECT PRODUCT
+ \rtimes \or % RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT
+ \leftthreetimes \or % LEFT SEMIDIRECT PRODUCT
+ \rightthreetimes \or % RIGHT SEMIDIRECT PRODUCT
+ \backsimeq \or % REVERSED TILDE EQUALS
+ \unknownchar \or % CURLY LOGICAL OR
+ \unknownchar \or % CURLY LOGICAL AND
+ \Subset \or % DOUBLE SUBSET
+ \Supset \or % DOUBLE SUPERSET
+ \Cap \or % DOUBLE INTERSECTION
+ \Cup \or % DOUBLE UNION
+ \pitchfork \or % PITCHFORK
+ \unknownchar \or % EQUAL AND PARALLEL TO
+ \unknownchar \or % LESS-THAN WITH DOT
+ \unknownchar \or % GREATER-THAN WITH DOT
+ \lll \or % VERY MUCH LESS-THAN
+ \ggg \or % VERY MUCH GREATER-THAN
+ \lesseqgtr \or % LESS-THAN EQUAL TO OR GREATER-THAN
+ \gtreqless \or % GREATER-THAN EQUAL TO OR LESS-THAN
+ \unknownchar \or % EQUAL TO OR LESS-THAN
+ \unknownchar \or % EQUAL TO OR GREATER-THAN
+ \curlyeqprec \or % EQUAL TO OR PRECEDES
+ \curlyeqsucc \or % EQUAL TO OR SUCCEEDS
+ \npreceq \or % DOES NOT PRECEDE OR EQUAL
+ \nsucceq \or % DOES NOT SUCCEED OR EQUAL
+ \unic@nsqsubseteq \or % NOT SQUARE IMAGE OF OR EQUAL TO
+ \unic@nsqsupseteq \or % NOT SQUARE ORIGINAL OF OR EQUAL TO
+ \unknownchar \or % SQUARE IMAGE OF OR NOT EQUAL TO
+ \unknownchar \or % SQUARE ORIGINAL OF OR NOT EQUAL TO
+ \lnsim \or % LESS-THAN BUT NOT EQUIVALENT TO
+ \gnsim \or % GREATER-THAN BUT NOT EQUIVALENT TO
+ \precnsim \or % PRECEDES BUT NOT EQUIVALENT TO
+ \succnsim \or % SUCCEEDS BUT NOT EQUIVALENT TO
+ \ntriangleleft \or % NOT NORMAL SUBGROUP OF
+ \ntriangleright \or % DOES NOT CONTAIN AS NORMAL SUBGROUP
+ \ntrianglelefteq \or % NOT NORMAL SUBGROUP OF OR EQUAL TO
+ \ntrianglerighteq \or % DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL
+ \vdots \or % VERTICAL ELLIPSIS
+ \cdots \or % MIDLINE HORIZONTAL ELLIPSIS
+ \unknownchar \or % UP RIGHT DIAGONAL ELLIPSIS
+ \ddots \or % DOWN RIGHT DIAGONAL ELLIPSIS
+ \unknownchar \or % ELEMENT OF WITH LONG HORIZONTAL STROKE
+ \unknownchar \or % ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE
+ \unknownchar \or % SMALL ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE
+ \unknownchar \or % ELEMENT OF WITH DOT ABOVE
+ \unknownchar \or % ELEMENT OF WITH OVERBAR
+ \unknownchar \or % SMALL ELEMENT OF WITH OVERBAR
+ \unknownchar \or % ELEMENT OF WITH UNDERBAR
+ \unknownchar \or % ELEMENT OF WITH TWO HORIZONTAL STROKES
+ \unknownchar \or % CONTAINS WITH LONG HORIZONTAL STROKE
+ \unknownchar \or % CONTAINS WITH VERTICAL BAR AT END OF HORIZONTAL STROKE
+ \unknownchar \or % SMALL CONTAINS WITH VERTICAL BAR AT END OF HORIZONTAL STROKE
+ \unknownchar \or % CONTAINS WITH OVERBAR
+ \unknownchar \else % SMALL CONTAINS WITH OVERBAR
+ \unknownchar % Z NOTATION BAG MEMBERSHIP
+ \fi
+\stopunicodevector
+
+\protect \endinput
diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex
index aa04c4c21..022cb84d7 100644
--- a/tex/context/base/verb-ini.tex
+++ b/tex/context/base/verb-ini.tex
@@ -123,7 +123,9 @@
%D spaces (control spaces) we only have to adapt the definition
%D of \type{\obeyedspace} to:
-\def\controlspace {\hbox{\char32}}
+\def\controlspace{\hbox{\char32}}
+\let\normalspacetoken=\
+\def\normalspaces{\catcode`\ =\@@space}
\bgroup
\catcode`\ =\@@active
diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex
index 49104030a..a3a83a918 100644
--- a/tex/context/base/xtag-ini.tex
+++ b/tex/context/base/xtag-ini.tex
@@ -307,17 +307,30 @@
.catcode`.|=.@@active
E
-.gdef.entitleXMLescapetokens
- B.activateXMLescapetokens
- .def#B&tex-hash;E*
- .def$B&tex-dollar;E*
- .def%B&tex-percent;E*
- .def\B&tex-backslash;E*
- .def^B&tex-hat;E*
- .def_B&tex-underscore;E*
- .def{B&tex-leftbrace;E*
- .def}B&tex-rightbrace;E*
- .def|B&tex-bar;E*
+* .gdef.entitleXMLescapetokens
+* B.activateXMLescapetokens
+* .def#B&tex-hash;E*
+* .def$B&tex-dollar;E*
+* .def%B&tex-percent;E*
+* .def\B&tex-backslash;E*
+* .def^B&tex-hat;E*
+* .def_B&tex-underscore;E*
+* .def{B&tex-leftbrace;E*
+* .def}B&tex-rightbrace;E*
+* .def|B&tex-bar;E*
+* E
+
+.xdef.entitleXMLescapetokens
+ B.noexpand.activateXMLescapetokens
+ .noexpand.def.noexpand#B.noexpand&.string#035;E*
+ .noexpand.def.noexpand$B.noexpand&.string#036;E*
+ .noexpand.def.noexpand%B.noexpand&.string#037;E*
+ .noexpand.def.noexpand\B.noexpand&.string#092;E*
+ .noexpand.def.noexpand^B.noexpand&.string#094;E*
+ .noexpand.def.noexpand_B.noexpand&.string#095;E*
+ .noexpand.def.noexpand{B.noexpand&.string#123;E*
+ .noexpand.def.noexpand}B.noexpand&.string#125;E*
+ .noexpand.def.noexpand|B.noexpand&.string#124;E*
E
.gdef.reduceXMLescapetokens
@@ -883,7 +896,7 @@
% \fi}
\def\XMLpureancestor#1%
- {\ifnum\numexpr\XMLdepth-#1\relax>\zerocount
+ {\ifcase\numexpr\XMLdepth-#1\relax\or
\csname\@@XMLdepth:\the\numexpr\XMLdepth-#1\relax\endcsname
\fi}
diff --git a/tex/context/base/xtag-map.tex b/tex/context/base/xtag-map.tex
index 077bca13e..76d2cfd21 100644
--- a/tex/context/base/xtag-map.tex
+++ b/tex/context/base/xtag-map.tex
@@ -376,8 +376,13 @@
\def\doremapXMLentity
{\xmlrent}
+% \unexpanded\def\xmlrent#1%
+% {\getXMLentity{#1}}
+%
+% replaced by:
+
\unexpanded\def\xmlrent#1%
- {\getXMLentity{#1}}
+ {\doXMLentity#1;}
%D The remapping is taken care of by the following macro,
%D which takes three arguments.
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index 6284f36ff..6a72dbabf 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.06.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.06.21">
<cd:variables>
<cd:variable name="one" value="jedna"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index ca03949b4..26a76a7c0 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.06.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.06.21">
<cd:variables>
<cd:variable name="one" value="eins"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index 7a65adf12..3daec8981 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.06.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.06.21">
<cd:variables>
<cd:variable name="one" value="one"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 9fd7a06be..f272ee751 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.06.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.06.21">
<cd:variables>
<cd:variable name="one" value="uno"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index c6ea1b19c..9a6b21cfe 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.06.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.06.21">
<cd:variables>
<cd:variable name="one" value="een"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index bd0c5e0dc..517160b28 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.06.07">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.06.21">
<cd:variables>
<cd:variable name="one" value="unu"/>