summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2010-12-02 17:40:12 +0200
committerMarius <mariausol@gmail.com>2010-12-02 17:40:12 +0200
commit47b26772f6e0d8fa43414325cb68c34c45645b9f (patch)
treed57706060bfb1197d239fed1b8d2d4c33cef0912
parent2e0934d99d3af014bd95c68d52f2d24816a11b8c (diff)
downloadcontext-47b26772f6e0d8fa43414325cb68c34c45645b9f.tar.gz
beta 2010.12.02 16:13
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/strc-lst.lua1
-rw-r--r--tex/context/base/strc-num.lua9
-rw-r--r--tex/context/base/strc-num.mkiv5
-rw-r--r--tex/context/base/tabl-ntb.mkiv2
-rw-r--r--tex/context/base/tabl-tab.mkiv437
-rw-r--r--tex/context/base/tabl-tbl.mkiv3
-rw-r--r--tex/context/base/v-parsed-xml.mkiv2
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
10 files changed, 130 insertions, 335 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index a9a9051d3..f3beb3cc0 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2010.12.02 12:05}
+\newcontextversion{2010.12.02 16:13}
%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.tex b/tex/context/base/context.tex
index 2f21c79c7..5abd31a1f 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2010.12.02 12:05}
+\edef\contextversion{2010.12.02 16:13}
%D For those who want to use this:
diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua
index 7b6448aca..5e154b1d6 100644
--- a/tex/context/base/strc-lst.lua
+++ b/tex/context/base/strc-lst.lua
@@ -492,7 +492,6 @@ function lists.savedprefixednumber(name,n)
helpers.prefix(data,data.prefixdata)
local numberdata = data.numberdata
if numberdata then
---~ print(name,n,table.serialize(numberdata))
sections.typesetnumber(numberdata,"number",numberdata or false)
end
end
diff --git a/tex/context/base/strc-num.lua b/tex/context/base/strc-num.lua
index c2f989070..1fefd864c 100644
--- a/tex/context/base/strc-num.lua
+++ b/tex/context/base/strc-num.lua
@@ -182,9 +182,10 @@ end
function counters.define(name, start, counter, method) -- todo: step
local d = allocate(name,1)
d.start = start
+ d.state = variables.start or ""
if counter ~= "" then
d.counter = counter -- only for special purposes, cannot be false
- d.method = method -- frozen at define time
+ d.method = method -- frozen at define time
end
end
@@ -374,13 +375,13 @@ end
function counters.add(name,n,delta)
local cd = counterdata[name]
- if cd and cd.state == variables.start then
+--~ table.print(cd,name)
+ if cd and (cd.state == variables.start or cd.state == "") then
local data = cd.data
local d = allocate(name,n)
--- table.print(cd)
d.number = (d.number or d.start or 0) + delta*(d.step or 0)
+ -- d.own = nil
local level = cd.level
--- print(name,n,level)
if not level or level == -1 then
-- -1 is signal that we reset manually
elseif level == -2 then
diff --git a/tex/context/base/strc-num.mkiv b/tex/context/base/strc-num.mkiv
index 32fcc9e7f..b386b5d95 100644
--- a/tex/context/base/strc-num.mkiv
+++ b/tex/context/base/strc-num.mkiv
@@ -49,7 +49,6 @@
\c!prefixconnector=.,
\c!prefixsegments=\thenamedstructurecounterlevel\currentstructurecounter,
\c!start=0,
- \c!state=\v!start,
\c!prefix=\v!yes,
\c!state=\v!start]
@@ -106,7 +105,7 @@
\def\dododefinestructurecounter[#1][#2]%
{\getparameters[\??nn#1][\s!counter=,#2]% counter is for internal purposes
- \ctxlua{structures.counters.define("#1",
+ \ctxlua{structures.counters.define("#1", % this will be a table
tonumber("\structurecounterparameter{#1}\c!start") or 0,
"\structurecounterparameter{#1}\s!counter",
"\structurecounterparameter{#1}\c!method")}%
@@ -469,7 +468,7 @@
{\setupstructurecounter
[#1]
[ \c!start=#2\c!start,
- \c!state=#2\c!state,
+ \c!state=#2\c!state, % beware, "" == start
\c!way=#2\c!way,
%
\c!prefix=#2\c!prefix,
diff --git a/tex/context/base/tabl-ntb.mkiv b/tex/context/base/tabl-ntb.mkiv
index 34c4e8bb2..8d694fc32 100644
--- a/tex/context/base/tabl-ntb.mkiv
+++ b/tex/context/base/tabl-ntb.mkiv
@@ -31,7 +31,7 @@
% \let\stopcelltable \eTABLE
% \starttext
-% \startcelltable[|c|c|]
+% \startcelltable
% \startrow \startcell a \stopcell \stoprow
% \startrow \startcell a \stopcell \stoprow
% \startrow \startcell a \stopcell \stoprow
diff --git a/tex/context/base/tabl-tab.mkiv b/tex/context/base/tabl-tab.mkiv
index fd05aae55..cf4c8b657 100644
--- a/tex/context/base/tabl-tab.mkiv
+++ b/tex/context/base/tabl-tab.mkiv
@@ -105,11 +105,10 @@
\newskip \!taLastRegularTabskip
-%newif \if!taDigit
\newif \if!taBeginFormat
\newif \if!taOnceOnlyTabskip
-\def\!thToksEdef#1=#2%
+\def\!thToksEdef#1#2%
{\edef\!ttemp{#2}%
#1\expandafter{\!ttemp}%
\ignorespaces}
@@ -122,11 +121,11 @@
\def\dobegintableformat
{\!taPreamble\emptytoks
\!taColumnNumber\zerocount
- \skip0=\tableintercolumnspaceunit
- \multiply\skip0 \tableintercolumnspacefactor
- \divide\skip0 2
- \!taRuleColumnTemplate\expandafter{\expandafter\tabskip\the\skip0 }%
- \!taLastRegularTabskip\skip0
+ \scratchskip\tableintercolumnspaceunit
+ \multiply\scratchskip\tableintercolumnspacefactor
+ \divide\scratchskip\plustwo
+ \!taRuleColumnTemplate\expandafter{\expandafter\tabskip\the\scratchskip}%
+ \!taLastRegularTabskip\scratchskip
\!taOnceOnlyTabskipfalse
\!taBeginFormattrue
\let\!tfRowOfWidths\empty
@@ -172,32 +171,32 @@
\def\!tfSetTabskip
{\ifnum\!tgCode=\plusone
- \skip0=\tableintercolumnspaceunit
- \multiply\skip0 \ifx\!tgValue\empty\tableintercolumnspacefactor\else\!tgValue\fi
+ \scratchskip\tableintercolumnspaceunit
+ \multiply\scratchskip \ifx\!tgValue\empty\tableintercolumnspacefactor\else\!tgValue\fi
\else
- \skip0=\!tgValue
+ \scratchskip\!tgValue
\fi
- \divide\skip0 by \plustwo
+ \divide\scratchskip\plustwo
\ifnum\!taColumnNumber=\zerocount
- %\!thToksEdef\!taRuleColumnTemplate={\the\!taRuleColumnTemplate\tabskip\the\skip0 }%
- \normalexpanded{\!taRuleColumnTemplate{\the\!taRuleColumnTemplate\tabskip\the\skip0 }}%
+ %\!thToksEdef\!taRuleColumnTemplate{\the\!taRuleColumnTemplate\tabskip\the\scratchskip}%
+ \normalexpanded{\!taRuleColumnTemplate{\the\!taRuleColumnTemplate\tabskip\the\scratchskip}}%
\else
- %\!thToksEdef\!taDataColumnTemplate={\the\!taDataColumnTemplate\tabskip\the\skip0 }%
- \normalexpanded{\!taDataColumnTemplate{\the\!taDataColumnTemplate\tabskip\the\skip0 }}%
+ %\!thToksEdef\!taDataColumnTemplate{\the\!taDataColumnTemplate\tabskip\the\scratchskip}%
+ \normalexpanded{\!taDataColumnTemplate{\the\!taDataColumnTemplate\tabskip\the\scratchskip}}%
\fi
\if!taOnceOnlyTabskip\else
- \!taLastRegularTabskip=\skip0 % Remember this Tabskip, for possible
- \fi % restoration after a subsequent"OnceOnly"
+ \!taLastRegularTabskip\scratchskip % Remember this Tabskip, for possible
+ \fi % restoration after a subsequent"OnceOnly"
\doreadtableformatkeys}
\def\!tfSetVrule
{\!thToksEdef\!taRuleColumnTemplate
- ={\noexpand\hfil
- \noexpand\vrule
+ {\hfil
+ \vrule
\noexpand\!!width
\ifnum\!tgCode=\plusone
\ifx\!tgValue\empty
- \tablevrulethicknessfactor
+ \tablevrulethicknessfactor
\else
\!tgValue
\fi
@@ -206,16 +205,16 @@
\!tgValue
\fi
####%
- \noexpand\hfil
+ \hfil
\the\!taRuleColumnTemplate}%
\!tfAdjoinPriorColumn}
\def\!tfSetAlternateVrule
{\afterassignment\!tfSetAlternateA
- \toks0 =}
+ \scratchtoks}
\def\!tfSetAlternateA
- {\!thToksEdef\!taRuleColumnTemplate={\the\toks0 \the\!taRuleColumnTemplate}%
+ {\!thToksEdef\!taRuleColumnTemplate{\the\scratchtoks\the\!taRuleColumnTemplate}%
\!tfAdjoinPriorColumn}
\def\!tfAdjoinPriorColumn
@@ -226,12 +225,12 @@
\else
\!tfUpdateRowOfWidths
\fi
- \!thToksEdef\!taDataColumnTemplate={\the\!taLeftGlue\the\!taDataColumnTemplate\the\!taRightGlue}%
- \!thToksEdef\!taPreamble={\the\!taPreamble&\the\!taDataColumnTemplate&\the\!taRuleColumnTemplate}%
+ \!thToksEdef\!taDataColumnTemplate{\the\!taLeftGlue\the\!taDataColumnTemplate\the\!taRightGlue}%
+ \!thToksEdef\!taPreamble{\the\!taPreamble&\the\!taDataColumnTemplate&\the\!taRuleColumnTemplate}%
\fi
\advance \!taColumnNumber \plusone
\if!taOnceOnlyTabskip
- \!thToksEdef\!taDataColumnTemplate={####\tabskip \the\!taLastRegularTabskip}%
+ \!thToksEdef\!taDataColumnTemplate{####\tabskip \the\!taLastRegularTabskip}%
\else
\!taDataColumnTemplate{##}%
\fi
@@ -265,7 +264,7 @@
\!taMinimumColumnWidth=\wd0 }
\def\!tfFinishFormat
- {\!thToksEdef\!taPreamble={####\tabskip\tablelefttabskip&\the\!taPreamble \tabskip\tablerighttabskip&####\tabskip\zeropoint\cr}
+ {\!thToksEdef\!taPreamble{####\tabskip\tablelefttabskip&\the\!taPreamble \tabskip\tablerighttabskip&####\tabskip\zeropoint\cr}
\!taBeginFormatfalse
\!ttDoHalign}
@@ -654,12 +653,9 @@
\!taDimenC\wd\scratchbox
\fi
\setbox\scratchbox\hbox{\mathsurround\zeropoint #1#2#1}%
- \!thToksEdef\!taDataColumnTemplate={%
- \noexpand\!tnSetNumericItem
- {\the\wd\scratchbox}%
- {\the\!taDimenC}%
- {#1}%
- \the\!taDataColumnTemplate} % Might have tabskip glue in here
+ \!thToksEdef\!taDataColumnTemplate
+ {\noexpand\!tnSetNumericItem{\the\wd\scratchbox}{\the\!taDimenC}{#1}%
+ \the\!taDataColumnTemplate}% Might have tabskip glue in here
\doreadtableformatkeys}
% SET NUMERIC ITEM
@@ -732,7 +728,7 @@
\fi
\setbox\scratchbox\hbox{\mathsurround\zeropoint #1#2#1}%
\!thToksEdef\!taDataColumnTemplate
- ={\noexpand\!tqSetQuantityItem{\the\wd\scratchbox}{\the\!taDimenC}{#1}%
+ {\noexpand\!tqSetQuantityItem{\the\wd\scratchbox}{\the\!taDimenC}{#1}%
\the\!taDataColumnTemplate}%
\doreadtableformatkeys}
@@ -744,27 +740,6 @@
\hbox to #1{\hss\mathsurround\zeropoint#3#4#3}%
\hbox to #2{\ifx\!ttemp\empty\else\mathsurround\zeropoint#3,#5#3\fi\hss}}
-% struts
-
-\def\domaketablestrut#1#2%
- {\vrule\!!width\zeropoint\!!height#1\!!depth#2\relax}
-
-\def\domakestandardtablestrut
- {\domaketablestrut
- {\tablestrutheightfactor\tablestrutunit}
- {\tablestrutdepthfactor \tablestrutunit }}
-
-\def\domakeaugmentedtablestrut#1#2%
- {\domaketablestrut
- {\dimexpr\tablestrutheightfactor\tablestrutunit+#1\tablestrutunit\relax}
- {\dimexpr\tablestrutdepthfactor \tablestrutunit+#2\tablestrutunit\relax}}
-
-\appendtoks
- \let\MakeStrut \domaketablestrut
- \let\StandardTableStrut \domakestandardtablestrut
- \let\AugmentedTableStrut\domakeaugmentedtablestrut
-\to \everytable
-
% \Enlarge<extra height><extra depth><original>
% \enlarge<multiple for extra height><multiple for extra depth><original>
@@ -784,24 +759,21 @@
\def\!TsEnlargeOther#1%
{\ifhmode
- \setbox\zerocount\hbox{#1\xdef\!TsSpaceFactor{\spacefactor=\the\spacefactor}}%
+ \setbox\scratchbox\hbox{#1\xdef\!TsSpaceFactor{\spacefactor\the\spacefactor}}%
\else
- \setbox\zerocount\hbox{#1}%
+ \setbox\scratchbox\hbox{#1}%
\fi
\!TsFinishEnlarge}
\def\!TsEnlargeMath#1#2%
- {\setbox\zerocount\hbox{$\mathsurround\zeropoint#1{#2}$}%
+ {\setbox\scratchbox\hbox{$\mathsurround\zeropoint#1{#2}$}%
\!TsFinishEnlarge}
\def\!TsFinishEnlarge
- {\dimen@\ht\zerocount
- \advance \dimen@ \!taDimenA
- \ht\zerocount\dimen@
- \dimen@\dp\zerocount
- \advance \dimen@ \!taDimenB
- \dp\zerocount\dimen@
- \box\zerocount \!TsSpaceFactor{}}
+ {\ht\scratchbox\dimexpr\ht\scratchbox+\!taDimenA\relax
+ \dp\scratchbox\dimexpr\dp\scratchbox+\!taDimenB\relax
+ \box\scratchbox
+ \!TsSpaceFactor\relax}
\def\dotableenlarge#1#2% 3rd argument is picked up later
{\dotableEnlarge{#1\tablestrutunit}{#2\tablestrutunit}}
@@ -813,23 +785,25 @@
% BEGIN TABLE
+\let\dotablestandardend\relax
+
\def\dotablestandardbegin[#1]% \!ttBeginTable (always argument)
{\if#1u% unboxed table
\ifmmode
- \def\!ttEndTable{\relax}% user had better be in display math mode and have only one table at the outer level
- \else % user had better be in vertical mode
+ \let\dotablestandardend\relax % user had better be in display math mode and have only one table at the outer level
+ \else % user had better be in vertical mode
\bgroup
- \def\!ttEndTable{\egroup}%
+ \let\dotablestandardend\egroup
\fi
\else
\hbox\bgroup
- \def\!ttEndTable{\egroup\egroup}%
+ \def\dotablestandardend{\egroup\egroup}%
\if#1t%
\vtop
\else\if#1b%
\vbox
\else
- \def\!ttEndTable{\egroup$\egroup}%
+ \def\dotablestandardend{\egroup$\egroup}%
%$\vcenter
\scratchtoks\everymath\everymath\emptytoks$\everymath\scratchtoks\vcenter
\fi\fi
@@ -879,49 +853,23 @@
% END TABLE
\def\dotablenormalend
- {\egroup % finishes the \halign
- \!ttEndTable}% closes off the table envirnoment set up by \tablestandardbegin
-
-\def\!ttEndOfRow
- {\futurelet\!tnext\!ttTestForBlank}
-
-\def\!ttTestForBlank
- {\ifx\!tnext\!thSpaceToken % the "usual" case
- \expandafter\!ttDoStandard
- \else
- \expandafter\!ttTestForZero
- \fi}
-
-\def\!ttTestForZero
- {\ifx0\!tnext
- \expandafter\!ttDoZero
- \else
- \expandafter\!ttTestForPlus
- \fi}
-
-\def\!ttTestForPlus
- {\ifx+\!tnext
- \expandafter\!ttDoPlus
- \else
- \expandafter\!ttDoStandard
- \fi}
-
-% DO ZERO: No strut
+ {\egroup % finishes the \halign
+ \dotablestandardend} % closes off the table envirnoment set up by \tablestandardbegin
-\def\!ttDoZero#1%% #1 eats the 0
+\def\donormaltablelineending
{\cr}
-\def\!ttDoPlus#1#2#3% #1 eats the +
- {\domakeaugmentedtablestrut{#2}{#3}%
- \cr}
-
-\def\!ttDoStandard
- {\domakestandardtablestrut
+\def\donormaltablelineformat#1#2%
+ {\vrule
+ \!!width \zeropoint
+ \!!height\dimexpr\tablestrutheightfactor\tablestrutunit+#1\tablestrutunit\relax
+ \!!depth \dimexpr\tablestrutdepthfactor \tablestrutunit+#2\tablestrutunit\relax
+ \relax
\cr}
% INSERT VRULE
-\def\@VLn{1}
+\newcount\noftablevrules \noftablevrules\plusone
\def\@VLd{.125em}
\let\tablecurrentvrulecolor\empty
@@ -941,36 +889,35 @@
\fi
\hskip\@VLd}
-\def\!ttInsertVrule
- {\hfil
+\def\donormaltablesimplebar
+ {\unskip\!ttRightGlue&&}
+
+\def\donormaltablecomplexbar
+ {\unskip\!ttRightGlue&\omit
+ \hfil
\ifx\tablecurrentvrulecolor\empty\else
\switchtocolor[\tablecurrentvrulecolor]%
\fi
- \ifcase\@VLn\or
+ \ifcase\noftablevrules\or
\do!ttInsertVrule
\unskip
\else
- \dorecurse\@VLn\do!ttInsertVrule
- \gdef\@VLn{1}%
+ \dorecurse\noftablevrules\do!ttInsertVrule
+ \global\noftablevrules\plusone
\unskip
\fi
\global\let\tablecurrentvrulecolor\empty
\hfil
&}
-% INSERT DEFAULT PSEUDO-RULE
-
-\def\!ttInsertDefaultPR*%
- {\PseudoVrule&} % User-specified default pseudo-rule
-
-% GET PSEUDO-RULE
+\def\donormaltablenobar
+ {\unskip\!ttRightGlue&\omit&}
-\def\!ttGetPseudoVrule#1%
- {\toks0={#1}#1&}
+\def\donormaltablesinglerule
+ {&\donormaltablelongrule&}
-% DEFAULT PSEUDO-RULE
-
-\let\PseudoVrule\empty
+\def\donormaltablemultirule
+ {&\!ttuse\tabledrulespan\donormaltablelongrule&}
% USE
@@ -1009,40 +956,26 @@
% rules
-\def\!ttFullHrule
- {\noalign
- \bgroup
- \!tgGetValue{\!ttFullHruleA}}
-
-\def\!ttFullHruleA
- {\!ttGetHalfRuleThickness
- \ifx\tablecurrenthrulecolor\empty\else
- \switchtocolor[\tablecurrenthrulecolor]%
- \fi
- \hrule\!!height\dimen0\!!depth\dimen0
- \global\let\tablecurrenthrulecolor\empty
- %\penalty0 % removed
- \egroup}
+\def\donormaltablefullrule
+ {\starttablenoalign
+ \!ttGetHalfRuleThickness
+ \hrule\!!height\scratchdimen\!!depth\scratchdimen
+ \stoptablenoalign}
-\def\!ttShortHrule
+\def\donormaltableshortrule % was: \!ttShortHrule
{\omit
- \!tgGetValue{\!ttShortHruleA}}
-
-\def\!ttShortHruleA
- {\!ttGetHalfRuleThickness
- \ifx\tablecurrenthrulecolor\empty\else
- \switchtocolor[\tablecurrenthrulecolor]%
- \fi
- \leaders\hrule\!!height\dimen0\!!depth\dimen0\hfill
+ \!ttGetHalfRuleThickness
+ \leaders\hrule\!!height\scratchdimen\!!depth\scratchdimen\hfill
\null
- \global\let\tablecurrenthrulecolor\empty
\ignorespaces}
-\def\!ttLongHrule
- {\omit\span\omit\span\!ttShortHrule}
+\def\donormaltablelongrule % was: \!ttLongHrule
+ {\omit\span
+ \omit\span
+ \donormaltableshortrule}
\def\!ttGetHalfRuleThickness
- {\dimen0=\dimexpr
+ {\scratchdimen\dimexpr
\ifnum\!tgCode=\plusone
\ifx\!tgValue\empty
\tablehrulethicknessfactor
@@ -1053,7 +986,7 @@
\else
\!tgValue % user-specified dimension
\fi
- \divide\dimen0 \plustwo}
+ \divide\scratchdimen\plustwo}
% \null prevents \unskip
@@ -1203,17 +1136,6 @@
\let\TableRight \dotableRight
\to \everytable
-%D We felt no need to write our own table building macros,
-%D simply because Michael Wichura made a terrific one. This
-%D package is quite complete and well documented. In \CONTEXT\
-%D we provide a shell for consistent spacing as well as color
-%D support. Implementing these features without adapting the
-%D original macros is not trivial. One easilly gets conflicts
-%D with \type{\omit}, \type{\span} and \type{\noalign}, which
-%D means that we end up postponing and overloading macros,
-%D mostly global. Now, let's start with loading the main
-%D macros.
-
%D \macros
%D {inintable, ifsplittables}
%D
@@ -1225,7 +1147,7 @@
\newif\ifintable
\newif\ifsplittables
-%D We show this feature in an eample that also shows some of
+%D We show this feature in an example that also shows some of
%D the basic table typesetting commands.
%D
%D \startbuffer
@@ -1296,131 +1218,22 @@
%D in the last row.
%D
%D \getbuffer
-
-%D Bringing color into tables is complicated by the mere fact
-%D that color is not part of \TEX. The main complication is
-%D that we don't know in advance how wide a column will be. I
-%D implemented color support in tables in the early 90's
-%D because I needed it for some articles on color. I have to
-%D admit that I seldom use the mechanism.
%D
-%D Most color support in \CONTEXT\ makes use of colored rules.
-%D At first sight, one is tempted to implement colors in tables
-%D in a similar way, but as said, we don't know the dimensions
-%D in advance. It turns out however that we don't have to,
-%D simply because alignments take care of stretching rules to
-%D the appropritate dimensions. This means that we can provide
-%D backgrounds by coloring rules with the height of a row,
-%D skipping upwards and finally drawing the content, like in:
-%D
-%D \gdef\ShowExample
-%D {\startfiguretext
-%D {none}
-%D {\getbuffer}
-%D \typebuffer
-%D \stopfiguretext}
+%D Some simple color support is provided:
%D
%D \startbuffer
%D \starttable[|c|c|]
%D \HL
-%D \BL[2] \SR
-%D \VL test \VL test \VL\SR
-%D \HL
-%D \VL test \VL test \VL\FR
-%D \VL test \VL test \VL\MR
-%D \VL test \VL test \VL\LR
-%D \HL
-%D \stoptable
-%D \stopbuffer
-%D
-%D \ShowExample
-%D
-%D Just to be complete we show how the other columns can be
-%D given a background. Later we will provide more details over
-%D the commands used.
-%D
-%D \startbuffer
-%D \starttable[|c|c|c|]
-%D \HL
-%D \BL[3] \SR
-%D \VL test \VL test \VL test \VL\SR
-%D \HL
-%D \stoptable
-%D \stopbuffer
-%D
-%D \ShowExample
-%D
-%D \startbuffer
-%D \starttable[|c|c|c|]
-%D \HL
-%D \BC \BL[2] \SR
-%D \VL test \VL test \VL test \VL\SR
-%D \HL
-%D \stoptable
-%D \stopbuffer
-%D
-%D \ShowExample
-%D
-%D \startbuffer
-%D \starttable[|c|c|c|]
-%D \HL
-%D \BC \BC \BL \SR
-%D \VL test \VL test \VL test \VL\SR
-%D \HL
-%D \stoptable
-%D \stopbuffer
-%D
-%D \ShowExample
-%D
-%D \startbuffer
-%D \starttable[|c|c|c|]
-%D \HL
-%D \BC \BL \SR
-%D \VL test \VL test \VL test \VL\SR
-%D \HL
-%D \stoptable
-%D \stopbuffer
-%D
-%D \ShowExample
-%D
-%D \startbuffer
-%D \starttable[|c|c|c|]
-%D \BL \BL \SR
-%D \HL
-%D \VL test \VL test \VL test \VL\SR
-%D \HL
-%D \stoptable
-%D \stopbuffer
-%D
-%D \ShowExample
-
-%D In these examples we can clearly see that for being a real
-%D background, the color or gray specification has to precede
-%D the content. Just to keep things simple, we can recall this
-%D specification later on:
-%D
-%D \startbuffer
-%D \starttable[|c|c|c|]
-%D \BC \BL \SR
-%D \HL
-%D \VL test \VL test \VL test \VL\SR
-%D \HL
-%D \BR\FR
-%D \VL test \VL test \VL test \VL\FR
-%D \BR\MR
-%D \VL test \VL test \VL test \VL\MR
-%D \BR\LR
-%D \VL test \VL test \VL test \VL\LR
+%D \VL test \VL test \VL \SR
+%D \HL[green,5]
+%D \VL[red] test \VL test \VL \FR
+%D \VL test \VL[10,red] test \VL \MR
+%D \VL test \VL test \VL[10] \LR
%D \HL
%D \stoptable
%D \stopbuffer
%D
-%D \ShowExample
-%D
-%D Close study learns that we can put the specification
-%D before or after the \type{\HL}, whatever suits best. Keeping
-%D track of these specifications is taken care of by the next
-%D variables:
+%D \typebuffer \getbuffer
\def\s!TaBlE{TaBlE}
\def\m!TABLE{TABLE}
@@ -1463,21 +1276,6 @@
\def\dosettableaction#1{\ifconditional\tableactionstatepermitted\global\tableactionstate#1\fi}
\def\dosettableforce #1{\ifconditional\tableactionstatepermitted\global\tableforcestate #1\fi}
-%D To keep things verbose, as well as to show what \TABLE\
-%D commands we affect, we show some meanings.
-
-\def\donormaltableshortrule {\!ttShortHrule}
-\def\donormaltablelongrule {\!ttLongHrule}
-\def\donormaltablefullrule {\!ttFullHrule}
-\def\donormaltableendofrow {\!ttEndOfRow}
-\def\donormaltablesimplebar {\unskip\!ttRightGlue&&}
-\def\donormaltablecomplexbar {\unskip\!ttRightGlue&\omit\!ttInsertVrule}
-\def\donormaltablenobar {\unskip\!ttRightGlue&\omit&}
-\def\donormaltablelineformat {\donormaltableendofrow+}
-\def\donormaltablelineending {\donormaltableendofrow0 }
-\def\donormaltablesinglerule {&\donormaltablelongrule&}
-\def\donormaltablemultirule #1{&\use{#1}\donormaltablelongrule&}
-
%D To give an impression of what the (well documented) source
%D of \TABLE\ looks like, we first implement an alternative for
%D the numeric keys. The quantity keys (\type{q} and \type{Q})
@@ -1529,8 +1327,7 @@
\def\starttablenoalign
{\tablenoalign\bgroup}
-\def\stoptablenoalign
- {\iffalse{\else}\fi}
+\let\stoptablenoalign\egroup
%D \macros
%D {starttable}
@@ -1830,15 +1627,15 @@
%D something like:
%D
%D \starttyping
-%D \starttablekop
+%D \starttablehead
%D \HL
%D \VL element \VL atom weight \VL\AR
%D \HL
-%D \stoptablekop
+%D \stoptablehead
%D
-%D \starttablestaart
+%D \starttabletail
%D \HL
-%D \stoptablestaart
+%D \stoptabletail
%D
%D \starttables[|||]
%D \VL ....... \VL ........... \VL\AR
@@ -2001,17 +1798,17 @@
\ifcase#1\relax
% unknown
\or
- \doendoftableline [blue][\SR->\SR]\tablerowfactor\tablerowfactor
+ \doendoftableline\SR\SR\tablerowfactor\tablerowfactor
\or
- \doendoftableline [red][\FR->\FR]\tablerowfactor\tablerowzero
+ \doendoftableline\FR\FR\tablerowfactor\tablerowzero
\or\ifnum\tableforcestate=\tableforcelastrowstate
- \doendoftableline [red][\MR->\LR]\tablerowzero\tablerowfactor
+ \doendoftableline\MR\LR\tablerowzero\tablerowfactor
\else\ifnum\tableforcestate=\tableforcefirstrowstate
- \doendoftableline [red][\MR->\FR]\tablerowfactor\tablerowzero
+ \doendoftableline\MR\FR\tablerowfactor\tablerowzero
\else
- \doendoftableline[green][\MR->\MR]\tablerowzero\tablerowzero
+ \doendoftableline\MR\MR\tablerowzero\tablerowzero
\fi\fi\or
- \doendoftableline [red][\LR->\LR]\tablerowzero\tablerowfactor
+ \doendoftableline\LR\LR\tablerowzero\tablerowfactor
\fi
\starttablenoalign
\dosettableforce\tableunknownstate
@@ -2053,11 +1850,11 @@
%D When tables are split, the spacing before and after a
%D horizontal rule is corrected according to what we expect.
-\def\doendoftableline[#1][#2->#3]#4#5%
- {\ifx#2#3\else
- \writestatus\m!TABLE{\string#2\space changed into \string#3}%
+\def\doendoftableline#1#2#3#4%
+ {\ifx#1#2\else
+ \writestatus\m!TABLE{\string#1\space changed into \string#2}%
\fi
- \expandafter\donormaltablelineformat#4#5\crcr % \crcr nodig ?
+ \expandafter\donormaltablelineformat#3#4\crcr % \crcr nodig ?
\tablenoalign{\nobreak\global\settrue\tableactionstatepermitted}}
%D In order to prevent (as good as possible) alignment overflow
@@ -2137,7 +1934,6 @@
\iffirstargument
\rawprocesscommalist[#1]\dotablevrulecommand
\fi
- %\normalexpanded{\noexpand\donormaltablecomplexbar\the\tablevrulethicknessfactor} }% \relax breaks \use
\donormaltablecomplexbar}% \relax breaks \use
\let\dotableVC\dotableVL % for mojca
@@ -2153,7 +1949,7 @@
\unexpanded\def\dotableVS {\VN1}
\unexpanded\def\dotableVD {\VN2}
\unexpanded\def\dotableVT {\VN3}
-\unexpanded\def\dotableVN#1{\gdef\@VLn{#1}\VL}
+\unexpanded\def\dotableVN#1{\global\noftablevrules#1\relax\VL}
\def\dotablehrulecommand#1% global assignments
{\doifnumberelse{#1}
@@ -2186,7 +1982,7 @@
\switchtocolor[\tablecurrenthrulecolor]%
\fi
\fi
- \normalexpanded{\noexpand\donormaltablefullrule\the\tablehrulethicknessfactor} %
+ \donormaltablefullrule
\egroup
\doaccounttablelinewidth
\fi
@@ -2310,15 +2106,14 @@
\fi
\ifcase\tabledrulespan
\global\advance\currenttablecolumn \plusone
- \let\next\donormaltablesinglerule
+ \donormaltablesinglerule
\or
\global\advance\currenttablecolumn \plustwo
- \let\next\donormaltablesinglerule
+ \donormaltablesinglerule
\else
\global\advance\currenttablecolumn \plusone
- \edef\next{\noexpand\donormaltablemultirule{\tabledrulespan} }%
+ \donormaltablemultirule
\fi
- \next
\fi}
\unexpanded\def\dotableDV
@@ -2346,11 +2141,11 @@
\def\doaccounttablelinewidth
{\scratchdimen\tablelinethicknessunit}
-\def\dotableTWO {\use2}
-\def\dotableTHREE {\use3}
-\def\dotableFOUR {\use4}
-\def\dotableFIVE {\use5}
-\def\dotableSIX {\use6}
+\def\dotableTWO {\use\plustwo}
+\def\dotableTHREE {\use\plusthree}
+\def\dotableFOUR {\use\plusfour}
+\def\dotableFIVE {\use\plusfive}
+\def\dotableSIX {\use\plussix}
\appendtoks
\let\TWO \dotableTWO
diff --git a/tex/context/base/tabl-tbl.mkiv b/tex/context/base/tabl-tbl.mkiv
index 9ff6b0f9e..d01a3c72b 100644
--- a/tex/context/base/tabl-tbl.mkiv
+++ b/tex/context/base/tabl-tbl.mkiv
@@ -252,8 +252,7 @@
\def\starttabulatenoalign
{\tabulatenoalign\bgroup}
-\def\stoptabulatenoalign
- {\iffalse{\else}\fi}
+\let\stoptabulatenoalign\egroup
% [|lg{.}|] => \NG 12.34 \NC
diff --git a/tex/context/base/v-parsed-xml.mkiv b/tex/context/base/v-parsed-xml.mkiv
index 2e45df2c8..b99328be7 100644
--- a/tex/context/base/v-parsed-xml.mkiv
+++ b/tex/context/base/v-parsed-xml.mkiv
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% todo: color specific elements
+
\registerctxluafile{v-parsed-xml.lua}{1.001}
\unprotect
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 371a61edf..4fde4ebb4 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 12/02/10 12:05:11
+-- merge date : 12/02/10 16:13:50
do -- begin closure to overcome local limits and interference