From 84b1ce7496ae8e315c6d6d65a97820155651cb23 Mon Sep 17 00:00:00 2001 From: Marius Date: Fri, 8 Jun 2012 18:40:14 +0300 Subject: beta 2012.06.08 17:18 --- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4141 -> 4141 bytes tex/context/base/context-version.png | Bin 105215 -> 105897 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 4 +- tex/context/base/lxml-ini.mkiv | 2 +- tex/context/base/pack-rul.mkiv | 2 +- tex/context/base/spac-cha.mkiv | 191 +++++++++++++++++++++ tex/context/base/status-files.pdf | Bin 24391 -> 24412 bytes tex/context/base/status-lua.pdf | Bin 181114 -> 181114 bytes tex/context/base/status-mkiv.lua | 11 +- tex/context/base/supp-ali.mkiv | 173 ------------------- tex/context/base/x-mathml.mkiv | 54 ++++-- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 15 files changed, 241 insertions(+), 204 deletions(-) create mode 100644 tex/context/base/spac-cha.mkiv delete mode 100644 tex/context/base/supp-ali.mkiv (limited to 'tex') diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 6fde41a34..2325d755c 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.06.08 10:07} +\newcontextversion{2012.06.08 17:18} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index fe8415046..7b34e0d51 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.06.08 10:07} +\newcontextversion{2012.06.08 17:18} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index 2e807d6bc..4f00d0eb6 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png index 655ba8d0a..cf8687dc0 100644 Binary files a/tex/context/base/context-version.png and b/tex/context/base/context-version.png differ diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 29574a248..53114d821 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.06.08 10:07} +\edef\contextversion{2012.06.08 17:18} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 5b8c6d55d..423b1a0f2 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.06.08 10:07} +\edef\contextversion{2012.06.08 17:18} %D For those who want to use this: @@ -153,7 +153,7 @@ \loadmarkfile{supp-ran} \loadmarkfile{supp-mat} -\loadmarkfile{supp-ali} +\loadmarkfile{spac-cha} \loadmarkfile{supp-num} % replaced \loadmarkfile{typo-ini} 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 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 5ed908d42..6c62c37d2 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf 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 @@ -300,12 +300,6 @@ return { status = "okay", comment = "will be moved to the math-* modules", }, - { - filename = "supp-ali", - marktype = "mkiv", - status = "unknown", - comment = "will be reimplemented", - }, { filename = "supp-num", marktype = "mkiv", @@ -1089,6 +1083,11 @@ return { marktype = "mkiv", status = "okay", }, + { + filename = "spac-cha", + marktype = "mkiv", + status = "okay", + }, { filename = "blob-ini", marktype = "mkiv", 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 diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index ce772abe7..82237d6de 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 06/08/12 10:07:44 +-- merge date : 06/08/12 17:18:04 do -- begin closure to overcome local limits and interference -- cgit v1.2.3