summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/context-version.pngbin105215 -> 105897 bytes
-rw-r--r--tex/context/base/lxml-ini.mkiv2
-rw-r--r--tex/context/base/pack-rul.mkiv2
-rw-r--r--tex/context/base/spac-cha.mkiv191
-rw-r--r--tex/context/base/status-files.pdfbin24391 -> 24412 bytes
-rw-r--r--tex/context/base/status-mkiv.lua11
-rw-r--r--tex/context/base/supp-ali.mkiv173
-rw-r--r--tex/context/base/x-mathml.mkiv54
8 files changed, 235 insertions, 198 deletions
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 655ba8d0a..cf8687dc0 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/lxml-ini.mkiv b/tex/context/base/lxml-ini.mkiv
index 14fbd68e6..83e0a6f71 100644
--- a/tex/context/base/lxml-ini.mkiv
+++ b/tex/context/base/lxml-ini.mkiv
@@ -186,7 +186,7 @@
\unexpanded\def\xmlprocessdata {\lxml_process\zerocount\xmlloaddata}
\unexpanded\def\xmlprocessbuffer {\lxml_process\zerocount\xmlloadbuffer}
\unexpanded\def\xmlprocessregistered{\lxml_process\zerocount\xmlloadregistered}
-\let\xmlprocess \xmlprocessfile
+ \let\xmlprocess \xmlprocessfile
\startxmlsetups xml:flush
\xmlflush{#1}
diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv
index 480997919..957b3e32f 100644
--- a/tex/context/base/pack-rul.mkiv
+++ b/tex/context/base/pack-rul.mkiv
@@ -216,7 +216,7 @@
\newdimen\d_framed_target_wd
\newdimen\d_framed_target_ht
\newdimen\d_framed_target_dp
-\newdimen\d_framed_linewidth
+\newdimen\d_framed_linewidth \let\ruledlinewidth\d_framed_linewidth % needed at lua end
\let\p_framed_frame \empty % \framedparameter\c!frame
\let\p_framed_backgroundoffset\empty
diff --git a/tex/context/base/spac-cha.mkiv b/tex/context/base/spac-cha.mkiv
new file mode 100644
index 000000000..a07c8f198
--- /dev/null
+++ b/tex/context/base/spac-cha.mkiv
@@ -0,0 +1,191 @@
+%D \module
+%D [ file=spac-cha, % was supp-ali,
+%D version=2012.06.08, % 2000.04.17,
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Character Alignment,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D Yet undocumented but nevertheless used.
+
+% 0 = centered
+% 1 = left in before
+% 2 = right in before
+% 3 = left in after
+% 4 = right in after
+
+\unprotect
+
+% \starttabulate[|cg{.}|cg{,}|cg{,}|]
+% \NC period \NC comma \NC comma \NC\NR
+% \NG 100.000,00 \NG 100.000,00 \NG 100,00 \NC\NR
+% \NG 10.000,00 \NG 10.000,00 \NG 1000,00 \NC\NR
+% \NG 100,00 \NG 100,00 \NG 10,00 \NC\NR
+% \NG 100,00 \NG 100,00 \NG 10,00 \NC\NR
+% \NG 10\\ \NG 10\\ \NG 0,00 \NC\NR
+% \NG 10 \NG 10 \NG 0,00 \NC\NR
+% \NG 10 \NG 10 \NG 0,00 \NC\NR
+% \stoptabulate
+
+% We gain not much by luafication and actually make things worse.
+
+\chardef\characteralignmentmode\plusfour
+\chardef\characteralignmentslot\plusone
+
+\let\afterassignwidth \!!zeropoint
+\let\beforeassignwidth\!!zeropoint
+
+\def\alignmentcharacter{.}
+
+\newdimen\d_supp_charalign_width
+\newtoks \t_supp_charalign_list
+
+\let\alignmentclass\s!default % can be used to handle multiple mixed ones
+
+\installcorenamespace{characteralign}
+
+\unexpanded\def\supp_charalign_push
+ {\ifcsname\??characteralign\alignmentclass\endcsname\else
+ \normalexpanded{\global\t_supp_charalign_list{\the\t_supp_charalign_list\supp_charalign_do{\alignmentclass}}}%
+ \fi
+ \setxvalue{\??characteralign\alignmentclass}{\supp_charalign_do
+ {\afterassignwidth}{\beforeassignwidth}{\alignmentcharacter}}}
+
+\unexpanded\def\supp_charalign_pop_do#1#2#3%
+ {\def\afterassignwidth {#1}%
+ \def\beforeassignwidth {#2}%
+ \def\alignmentcharacter{#3}}
+
+\unexpanded\def\supp_charalign_pop
+ {\let\supp_charalign_do\supp_charalign_pop_do
+ \executeifdefined{\??characteralign\alignmentclass}\donothing}
+
+\unexpanded\def\supp_charalign_reset_do#1%
+ {\global\letbeundefined{\??characteralign#1}} % global !
+
+\unexpanded\def\resetcharacteralign
+ {\let\supp_charalign_do\supp_charalign_reset_do
+ \the\t_supp_charalign_list
+ \global\t_supp_charalign_list\emptytoks}
+
+\unexpanded\def\supp_charalign_firstpass_one#1#2%
+ {\supp_charalign_pop
+ \let\\\empty
+ \setbox\scratchbox\hbox{#1}%
+ \d_supp_charalign_width\wd\scratchbox
+ \setbox\scratchbox\emptyhbox
+ \supp_charalign_check#2#1\relax\relax
+ \scratchdimen-\wd\scratchbox
+ \setbox\scratchbox\hbox{\ignorespaces#2\unskip}%
+ \advance\scratchdimen \wd\scratchbox
+ \ifdim\scratchdimen>\beforeassignwidth\relax
+ \edef\beforeassignwidth{\the\scratchdimen}%
+ \fi
+ \ifdim\scratchdimen=\zeropoint
+ \setbox\scratchbox\hbox{\ignorespaces#2\unskip}%
+ \scratchdimen\wd\scratchbox
+ \ifcase\characteralignmentmode
+ % do nothing
+ \else\ifnum\characteralignmentmode<\plusthree
+ \advance\scratchdimen\d_supp_charalign_width\relax
+ \ifdim\scratchdimen>\beforeassignwidth\relax
+ \edef\beforeassignwidth{\the\scratchdimen}%
+ \fi
+ \else
+ \ifdim\scratchdimen>\afterassignwidth\relax
+ \edef\afterassignwidth{\the\scratchdimen}%
+ \fi
+ \fi\fi
+ \fi
+ \supp_charalign_push}
+
+\unexpanded\def\supp_charalign_firstpass_two#1#2#3%
+ {\ifx#2\relax
+ \setbox\scratchbox\hbox{\ignorespaces#1\unskip}%
+ \ifdim\wd\scratchbox>\afterassignwidth
+ \edef\afterassignwidth{\the\wd\scratchbox}%
+ \fi
+ \else
+ \supp_charalign_check#2#3\relax\relax
+ \fi}
+
+\unexpanded\def\supp_charalign_secondpass_one#1#2%
+ {\supp_charalign_pop
+ \let\\\empty % beware, no grouping
+ \setbox\scratchbox\hbox{#1}%
+ \d_supp_charalign_width\wd\scratchbox
+ \setbox\scratchbox\emptyhbox
+ % new 12,34 vs 10\\ where 10 aligns on 12 if #1 = ,
+ \ifcase\characteralignmentslot
+ \supp_charalign_check#2#1\relax\relax
+ \scratchdimen\wd\scratchbox
+ \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%
+ \else
+ \def\\{#1}%
+ \normalexpanded{\supp_charalign_check#2#1\relax\relax}%
+ \scratchdimen\wd\scratchbox
+ \setbox\scratchbox\hbox{\def\\{\hphantom{#1}}\ignorespaces#2\unskip}%
+ \fi
+ \noindent
+ \ifdim\scratchdimen=\wd\scratchbox
+ \ifcase\characteralignmentmode
+ \box\scratchbox
+ \else
+ \hbox
+ {\dontcomplain
+ \hbox to \beforeassignwidth
+ {\ifcase\characteralignmentmode\or
+ \box\scratchbox\hss
+ \or
+ \hss\box\scratchbox\hskip\d_supp_charalign_width
+ \or
+ \hss\rlap{\box\scratchbox}%
+ \or
+ \hss\rlap{\hbox to \afterassignwidth{\hss\box\scratchbox}}%
+ \fi}%
+ \hskip\afterassignwidth}%
+ \fi
+ \else
+ \hbox
+ {\hbox to \beforeassignwidth
+ {\hss\box\scratchbox\hskip-\scratchdimen}%
+ \hskip\afterassignwidth}%
+ \fi}
+
+\unexpanded\def\supp_charalign_secondpass_two#1#2#3%
+ {\ifx#2\relax
+ \setbox\scratchbox\hbox{\ignorespaces#1\unskip}%
+ \else
+ \supp_charalign_check#2#3\relax\relax
+ \fi}
+
+\unexpanded\def\supp_charalign_firstpass#1%
+ {\unexpanded\def\checkalignment ##1{\supp_charalign_firstpass_one{#1}{##1}}%
+ \unexpanded\def\supp_charalign_check##1#1##2##3\relax{\supp_charalign_firstpass_two{##1}{##2}{##3}}}
+
+\unexpanded\def\supp_charalign_secondpass#1%
+ {\unexpanded\def\checkalignment ##1{\supp_charalign_secondpass_one{#1}{##1}}%
+ \unexpanded\def\supp_charalign_check##1#1##2##3\relax{\supp_charalign_secondpass_two{##1}{##2}{##3}}}
+
+\unexpanded\def\setfirstpasscharacteralign
+ {\supp_charalign_pop
+ \normalexpanded{\supp_charalign_firstpass{\alignmentcharacter}}}
+
+\unexpanded\def\setsecondpasscharacteralign
+ {\supp_charalign_pop
+ \normalexpanded{\supp_charalign_secondpass{\alignmentcharacter}}}
+
+\unexpanded\def\startcharacteralign#1\stopcharacteralign
+ {\bgroup
+ \setfirstpasscharacteralign #1%
+ \setsecondpasscharacteralign#1%
+ \egroup}
+
+\let\stopcharacteralign\relax
+
+\protect \endinput
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index f41c2c98d..85ef46ca9 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua
index 492d0cea6..f6096863e 100644
--- a/tex/context/base/status-mkiv.lua
+++ b/tex/context/base/status-mkiv.lua
@@ -301,12 +301,6 @@ return {
comment = "will be moved to the math-* modules",
},
{
- filename = "supp-ali",
- marktype = "mkiv",
- status = "unknown",
- comment = "will be reimplemented",
- },
- {
filename = "supp-num",
marktype = "mkiv",
status = "obsolete",
@@ -1090,6 +1084,11 @@ return {
status = "okay",
},
{
+ filename = "spac-cha",
+ marktype = "mkiv",
+ status = "okay",
+ },
+ {
filename = "blob-ini",
marktype = "mkiv",
status = "unknown",
diff --git a/tex/context/base/supp-ali.mkiv b/tex/context/base/supp-ali.mkiv
deleted file mode 100644
index 54a7b77e4..000000000
--- a/tex/context/base/supp-ali.mkiv
+++ /dev/null
@@ -1,173 +0,0 @@
-%D \module
-%D [ file=supp-ali,
-%D version=2000.04.17,
-%D title=\CONTEXT\ Support Macros,
-%D subtitle=Alignment,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-%D Yet undocumented.
-
-% 0 = centered
-% 1 = left in before
-% 2 = right in before
-% 3 = left in after
-% 4 = right in after
-
-\unprotect
-
-% \starttabulate[|cg{.}|cg{,}|cg{,}|]
-% \NC period \NC comma \NC comma \NC\NR
-% \NG 100.000,00 \NG 100.000,00 \NG 100,00 \NC\NR
-% \NG 10.000,00 \NG 10.000,00 \NG 1000,00 \NC\NR
-% \NG 100,00 \NG 100,00 \NG 10,00 \NC\NR
-% \NG 100,00 \NG 100,00 \NG 10,00 \NC\NR
-% \NG 10\\ \NG 10\\ \NG 0,00 \NC\NR
-% \NG 10 \NG 10 \NG 0,00 \NC\NR
-% \NG 10 \NG 10 \NG 0,00 \NC\NR
-% \stoptabulate
-
-\chardef\characteralignmentmode=4
-\chardef\characteralignmentslot=1
-
-\newtoks\@@characteralignlst
-
-\let\afterassignwidth \!!zeropoint
-\let\beforeassignwidth\!!zeropoint
-
-\def\alignmentcharacter{.}
-
-\let\alignmentclass\s!default % can be used to handle multiple mixed ones
-
-\def\setfirstpasscharacteralign
- {\popcharacteralign
- \expanded{\dosetfirstpasscharacteralign{\alignmentcharacter}}}
-
-\def\dosetfirstpasscharacteralign#1%
- {\def\checkalignment##1%
- {\popcharacteralign
- \let\\\empty
- \setbox\scratchbox\hbox{#1}%
- \edef\characterassignwidth{\the\wd\scratchbox}%
- \setbox\scratchbox\emptyhbox
- \docheckalignment##1#1\relax\relax
- \scratchdimen-\wd\scratchbox
- \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%
- \advance\scratchdimen \wd\scratchbox
- \ifdim\scratchdimen>\beforeassignwidth\relax
- \edef\beforeassignwidth{\the\scratchdimen}%
- \fi
- \ifdim\scratchdimen=\zeropoint
- \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%
- \scratchdimen\wd\scratchbox
- \ifcase\characteralignmentmode
- % do nothing
- \else\ifnum\characteralignmentmode<\plusthree
- \advance\scratchdimen \characterassignwidth
- \ifdim\scratchdimen>\beforeassignwidth\relax
- \edef\beforeassignwidth{\the\scratchdimen}%
- \fi
- \else
- \ifdim\scratchdimen>\afterassignwidth\relax
- \edef\afterassignwidth{\the\scratchdimen}%
- \fi
- \fi\fi
- \fi
- \pushcharacteralign}%
- \def\docheckalignment##1#1##2##3\relax
- {\ifx##2\relax
- \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%
- \ifdim\wd\scratchbox>\afterassignwidth
- \edef\afterassignwidth{\the\wd\scratchbox}%
- \fi
- \else
- \docheckalignment##2##3\relax\relax
- \fi}}
-
-\def\setsecondpasscharacteralign
- {\popcharacteralign
- \expanded{\dosetsecondpasscharacteralign{\alignmentcharacter}}}
-
-\def\dosetsecondpasscharacteralign#1%
- {\def\checkalignment##1%
- {\popcharacteralign
- \let\\\empty % beware, no grouping
- \setbox\scratchbox\hbox{#1}%
- \edef\characterassignwidth{\the\wd\scratchbox}%
- \setbox\scratchbox\emptyhbox
- % new 12,34 vs 10\\ where 10 aligns on 12 if #1 = ,
- \ifcase\characteralignmentslot
- \docheckalignment##1#1\relax\relax
- \scratchdimen\wd\scratchbox
- \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%
- \else
- \def\\{#1}%
- \expanded{\docheckalignment##1#1\relax\relax}%
- \scratchdimen\wd\scratchbox
- \setbox\scratchbox\hbox{\def\\{\hphantom{#1}}\ignorespaces##1\unskip}%
- \fi
- \noindent
- \ifdim\scratchdimen=\wd\scratchbox
- \ifcase\characteralignmentmode
- \box\scratchbox
- \else
- \hbox
- {\dontcomplain
- \hbox to \beforeassignwidth
- {\ifcase\characteralignmentmode\or
- \box\scratchbox\hss
- \or
- \hss\box\scratchbox\hskip\characterassignwidth
- \or
- \hss\rlap{\box\scratchbox}%
- \or
- \hss\rlap{\hbox to \afterassignwidth{\hss\box\scratchbox}}%
- \fi}%
- \hskip\afterassignwidth}%
- \fi
- \else
- \hbox
- {\hbox to \beforeassignwidth
- {\hss\box\scratchbox\hskip-\scratchdimen}%
- \hskip\afterassignwidth}%
- \fi}%
- \def\docheckalignment##1#1##2##3\relax
- {\ifx##2\relax
- \setbox\scratchbox\hbox{\ignorespaces##1\unskip}%
- \else
- \docheckalignment##2##3\relax\relax
- \fi}}
-
-% provide a means to use multiple alignments mixed
-
-\def\pushcharacteralign
- {\ifcsname @cac@\alignmentclass\endcsname\else
- \doglobal\appendetoks\noexpand\do{\alignmentclass}\to\@@characteralignlst
- \fi
- \setxvalue{@cac@\alignmentclass}{\noexpand\do
- {\afterassignwidth}{\beforeassignwidth}{\alignmentcharacter}}}
-
-\def\popcharacteralign
- {\def\do##1##2##3%
- {\def\afterassignwidth {##1}%
- \def\beforeassignwidth {##2}%
- \def\alignmentcharacter{##3}}%
- \executeifdefined{@cac@\alignmentclass}\donothing}
-
-\def\resetcharacteralign % does not work well nested
- {\def\do##1{\global\letbeundefined{@cac@##1}}% global !
- \the\@@characteralignlst
- \global\@@characteralignlst\emptytoks}
-
-\long\def\startcharacteralign#1\stopcharacteralign
- {\bgroup
- \setfirstpasscharacteralign #1%
- \setsecondpasscharacteralign#1%
- \egroup}
-
-\protect \endinput
diff --git a/tex/context/base/x-mathml.mkiv b/tex/context/base/x-mathml.mkiv
index f64fdbc74..0848c1754 100644
--- a/tex/context/base/x-mathml.mkiv
+++ b/tex/context/base/x-mathml.mkiv
@@ -2071,26 +2071,46 @@
\xmlflush{#1}
\stopxmlsetups
+% \startxmlsetups mml:mrow
+% \begingroup
+% \edef\nofmmlrows{\xmlcount{#1}{/mml:mo}}%
+% \ifnum\nofmmlrows=\plustwo
+% \xmldoifelse {#1} {/mml:mo[position()==1 or position()==\nofmmlrows]} {% we need a {}
+% \def\MMLleft {\left }
+% \def\MMLright {\right}
+% \def\MMLmiddle{\middle}
+% \enabledelimiter
+% \checkdelimiters{\xmlall{#1}{/mml:mo}}
+% \fakeleftdelimiter
+% \xmlflush{#1}
+% \fakerightdelimiter
+% \disabledelimiter
+% } {
+% \xmlflush{#1}
+% }
+% \else
+% \xmlflush{#1}
+% \fi
+% \endgroup
+% \stopxmlsetups
+%
+% fails on { ... so we need
+
\startxmlsetups mml:mrow
\begingroup
- \edef\nofmmlrows{\xmlcount{#1}{/mml:mo}}%
- \ifnum\nofmmlrows=\plustwo
- \xmldoifelse {#1} {/mml:mo[position()==1 or position()==\nofmmlrows]} {% we need a {}
- \def\MMLleft {\left }
- \def\MMLright {\right}
- \def\MMLmiddle{\middle}
- \enabledelimiter
- \checkdelimiters{\xmlall{#1}{/mml:mo}}
- \fakeleftdelimiter
- \xmlflush{#1}
- \fakerightdelimiter
- \disabledelimiter
- } {
- \xmlflush{#1}
- }
- \else
+ \xmldoifelse {#1} {/mml:mo[first() or last()]} {% we need a {}
+ \def\MMLleft {\left }
+ \def\MMLright {\right}
+ \def\MMLmiddle{\middle}
+ \enabledelimiter
+ \checkdelimiters{\xmlall{#1}{/mml:mo}}
+ \fakeleftdelimiter
\xmlflush{#1}
- \fi
+ \fakerightdelimiter
+ \disabledelimiter
+ } {
+ \xmlflush{#1}
+ }
\endgroup
\stopxmlsetups