summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/tabl-tbl.mkxl
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/tabl-tbl.mkxl')
-rw-r--r--tex/context/base/mkxl/tabl-tbl.mkxl43
1 files changed, 29 insertions, 14 deletions
diff --git a/tex/context/base/mkxl/tabl-tbl.mkxl b/tex/context/base/mkxl/tabl-tbl.mkxl
index f29389f15..64a865a2a 100644
--- a/tex/context/base/mkxl/tabl-tbl.mkxl
+++ b/tex/context/base/mkxl/tabl-tbl.mkxl
@@ -224,6 +224,9 @@
\newconstant \c_tabl_tabulate_localcolorspan
\newconstant \c_tabl_tabulate_modus
+%newconditional \c_tabl_pre_is_set
+\newconditional \c_tabl_post_is_set
+
\let \m_tabl_tabulate_separator_factor \empty % fraction
\aliased\let\tabulatesplitlinemode\c_tabl_tabulate_splitlinemode % temp hack, we need an interface
@@ -409,9 +412,9 @@
\fi}
% \protected % we can expand this one
-\def\tabl_tabulate_inject_post_skip#1%
+\def\tabl_tabulate_inject_post_skip#1#2%
{\ifdim#1>\zeropoint
- \kern#1\relax % was \hskip
+ \kern\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns#2\else#1\fi\relax
\orelse\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns
\ifconditional\c_tabl_tabulate_autorulespacing
\ifcase\c_tabl_tabulate_has_rule_spec_last\else
@@ -478,7 +481,7 @@
\ifempty\m_tabl_tabulate_text_color
\expandafter\gobbleoneargument
\else
- \expandafter\dofastcoloractivation
+ \expandafter\colo_helpers_direct_activate
\fi\m_tabl_tabulate_text_color
\noexpand\fi
% grouping needs to be outside macros (or expandable), nice test
@@ -501,7 +504,9 @@
\egroup
\aligntab
\noexpand\dostoptagged
- \tabl_tabulate_inject_post_skip{\the\dimexpr\s_tabl_tabulate_post}% get rid of plus
+ \tabl_tabulate_inject_post_skip
+ {\the\ifconditional\c_tabl_post_is_set\s_tabl_tabulate_post\else\s_tabl_tabulate_last\fi}%
+ {\the\s_tabl_tabulate_post}%
\alignmark\alignmark
}%
\toksapp\t_tabl_tabulate_dummy{\NC}%
@@ -512,7 +517,9 @@
\s_tabl_tabulate_post\zeropoint
\fi
%\let\gettabulateexit\dogettabulateexit % still needed ?
- \d_tabl_tabulate_width\zeropoint}
+ \d_tabl_tabulate_width\zeropoint
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set}
\permanent\protected\def\installtabulatepreambleoption#1#2%
{\defcsname\??tabulatepreamble\string#1\endcsname{#2}}%
@@ -592,17 +599,21 @@
\tabl_tabulate_set_preamble}
\def\tabl_tabulate_set_preskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_posskip#1%
- {\doifelsenumber{#1}%
+ {\settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_post#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_post.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_preposskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble#1}}
@@ -773,6 +784,8 @@
\c_tabl_tabulate_modus\zerocount
\setfalse\c_tabl_tabulate_pwidth_set
\setfalse\c_tabl_tabulate_reshape
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set
\t_tabl_tabulate_before\emptytoks
\t_tabl_tabulate_after\emptytoks
\t_tabl_tabulate_bmath\emptytoks
@@ -1175,9 +1188,9 @@
\fi
\tabl_tabulate_start_building}
-\letvalue{\e!stop\v!tabulate }\relax
-\letvalue{\e!stop\v!tabulatehead}\relax
-\letvalue{\e!stop\v!tabulatetail}\relax
+\permanent\letcsname\e!stop\v!tabulate \endcsname\relax
+\permanent\letcsname\e!stop\v!tabulatehead\endcsname\relax
+\permanent\letcsname\e!stop\v!tabulatetail\endcsname\relax
\permanent\protected\def\tabl_tabulate_start_ignore % todo when we go frozen
{\em Nested tabulate is not (yet) supported.\relax
@@ -1290,7 +1303,7 @@
\edef\p_line {\tabulationparameter\c!rule}%
\edef\p_rulecolor {\tabulationparameter\c!rulecolor}%
\edef\p_rulethickness{\tabulationparameter\c!rulethickness}%
- \edef\p_bodyfont {\tabulationparameter\c!bodyfont}
+ \edef\p_bodyfont {\tabulationparameter\c!bodyfont}%
\edef\p_indenting {\tabulationparameter\c!indenting}%
\edef\p_keeptogether {\tabulationparameter\c!keeptogether}%
\edef\p_blank {\tabulationparameter\c!blank}%
@@ -1468,7 +1481,7 @@
\tabl_tabulate_column_normal}
\def\tabl_tabulate_column_vruled_step#1%
- {\doifelsenumber{#1}
+ {\doifelsenumber{#1}%
{\global\d_tabl_tabulate_vrulethickness_local#1\d_tabl_tabulate_vrulethickness_default}
{\xdef\m_tabl_tabulate_vrule_color_local{#1}}}
@@ -1572,7 +1585,7 @@
\egroup}
\def\tabl_tabulate_hrule_preset_step#1%
- {\doifelsenumber{#1}
+ {\doifelsenumber{#1}%
{\global\d_tabl_tabulate_hrulethickness_local#1\d_tabl_tabulate_hrulethickness_default}
{\xdef\currenttabulationlocalhrulecolor{#1}}}
@@ -2161,6 +2174,8 @@
\s_tabl_tabulate_last\s_tabl_tabulate_first
\s_tabl_tabulate_pre\zeropoint
\s_tabl_tabulate_post\zeropoint
+ %setfalse\s_tabl_pre_is_set
+ \setfalse\s_tabl_post_is_set
\global\c_tabl_tabulate_columns\zerocount
\global\c_tabl_tabulate_nofauto\zerocount
\global\c_tabl_tabulate_noflines\zerocount