summaryrefslogtreecommitdiff
path: root/tex/context/base/tabl-tbl.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-05 00:40:31 +0300
committerMarius <mariausol@gmail.com>2013-10-05 00:40:31 +0300
commit3b2e97139b40df9c0308de41fb619cfad7dc6f18 (patch)
treef85782e0609559dbe29232b51a15612b2a8e58ec /tex/context/base/tabl-tbl.mkiv
parenta90bcf0dcd9265b64b65b1f874b39f4c75553137 (diff)
downloadcontext-3b2e97139b40df9c0308de41fb619cfad7dc6f18.tar.gz
beta 2013.10.04 23:41
Diffstat (limited to 'tex/context/base/tabl-tbl.mkiv')
-rw-r--r--tex/context/base/tabl-tbl.mkiv35
1 files changed, 21 insertions, 14 deletions
diff --git a/tex/context/base/tabl-tbl.mkiv b/tex/context/base/tabl-tbl.mkiv
index f04c45e18..fa2417712 100644
--- a/tex/context/base/tabl-tbl.mkiv
+++ b/tex/context/base/tabl-tbl.mkiv
@@ -232,7 +232,6 @@
\unexpanded\def\tolerantTABLEbreaktrue {\settrue \c_tabl_tabulate_tolerant_break} % used in styles !
\unexpanded\def\handletabulatepbreakfalse{\setfalse\c_tabl_tabulate_handlepbreak } % depricated
-\installcorenamespace{tabulatealign}
\installcorenamespace{tabulatebox}
\installcorenamespace{tabulatesetup}
\installcorenamespace{tabulatehook}
@@ -297,14 +296,6 @@
% [|lg{.}|] => \NG 12.34 \NC
-\def\tabl_tabulate_charalign#1 % space delimited ! (will be redone in lua)
- {\edef\alignmentclass{\the\c_tabl_tabulate_column}%
- \edef\alignmentcharacter{\csname\??tabulatealign\the\c_tabl_tabulate_column\endcsname}%
- \ifcase\c_tabl_tabulate_pass\or
- \setfirstpasscharacteralign\checkalignment{#1}%
- \fi % force hsize
- \setsecondpasscharacteralign\checkalignment{#1}}
-
\def\tabl_tabulate_nobreak_inject_tracer
{\red % maybe use the fast color switcher here
\hrule\s!height.5\linewidth\s!depth.5\linewidth
@@ -425,6 +416,8 @@
\let\tabl_tabulate_hook_b\donothing
\let\tabl_tabulate_hook_e\donothing
+\let\tabl_tabulate_hook_g\donothing
+
\def\tabl_tabulate_set_preamble_step#1#2% only makes sense for many tabulates
{\normalexpanded{\t_tabl_tabulate_preamble{\the\t_tabl_tabulate_preamble
\tabl_tabulate_check_local_vrule_thickness\constantdimenargument\d_tabl_tabulate_vrulethickness
@@ -440,6 +433,7 @@
\tabl_tabulate_color_side_both
\global\c_tabl_tabulate_colorspan\zerocount
\global\c_tabl_tabulate_column\constantnumber\c_tabl_tabulate_columns
+ \tabl_tabulate_hook_g
\tabl_tabulate_setups_check % unexpandable
\tabl_tabulate_hook_check % unexpandable
\ifzeropt\d_tabl_tabulate_width
@@ -624,10 +618,22 @@
{\setvalue{\??tabulatehook\the\c_tabl_tabulate_columns}{#1}%
\tabl_tabulate_set_preamble}
+% begin of character align plugin
+
+\newconditional\c_tabl_auto_align_mode % reset later
+
+\def\tabl_tabulate_hook_g % partly expanded
+ {\ifconditional\c_tabl_auto_align_mode
+ \signalcharacteralign\c_tabl_tabulate_column{\c_tabl_tabulate_noflines+\plusone}%
+ \fi}
+
\def\tabl_tabulate_set_align#1%
- {\setvalue{\??tabulatealign\the\c_tabl_tabulate_columns}{#1}%
+ {\global\settrue\c_tabl_auto_align_mode
+ \setcharacteralign\c_tabl_tabulate_columns{#1}%
\tabl_tabulate_set_preamble}
+% end of character align plugin
+
\def\tabl_tabulate_set_before#1%
{\t_tabl_tabulate_before{#1}%
\tabl_tabulate_set_preamble}
@@ -759,6 +765,7 @@
\global\let\m_tabl_tabulate_text_color\empty
\global\let\m_tabl_tabulate_vrule_color\empty
\global\c_tabl_tabulate_colorspan\zerocount
+ \global\setfalse\c_tabl_auto_align_mode
\global\advance\c_tabl_tabulate_columns\plusone
\expandafter\let\csname\??tabulatesetup\the\c_tabl_tabulate_columns\endcsname\donothing % here ?
\edef\currenttabulationtrulespec{#1}%
@@ -768,7 +775,7 @@
\global\d_tabl_tabulate_vrulethickness\d_tabl_tabulate_vrulethickness_default
\rawprocesscommalist[#1]\tabl_tabulate_set_vrule_command
\fi
- \tabl_tabulate_set_preamble#2\relax\relax % permits i without n
+ \tabl_tabulate_set_preamble#2\relax\relax % permits i without n
\ifcase\c_tabl_tabulate_modus\relax
\tabl_tabulate_set_width_normal
\or % fixed width
@@ -845,8 +852,7 @@
\let\tabl_tabulate_hook\tabl_tabulate_hook_nop
-\def\tabl_tabulate_hook_yes {\csname\??tabulatehook \the\c_tabl_tabulate_column\endcsname}
-\def\tabl_tabulate_align_yes{\csname\??tabulatealign\the\c_tabl_tabulate_column\endcsname} % to be used
+\def\tabl_tabulate_hook_yes{\csname\??tabulatehook\the\c_tabl_tabulate_column\endcsname}
\def\tabl_tabulate_pheight_reset
{\global\c_tabl_tabulate_plines_min\plusone
@@ -1696,7 +1702,8 @@
\unexpanded\def\tabl_tabulate_RQ_first{\tabl_tabulate_column_equal \plusone}
\unexpanded\def\tabl_tabulate_HQ_first{\tabl_tabulate_column_equal \plustwo}
-\unexpanded\def\tabl_tabulate_NG_first{\NC\tabl_tabulate_charalign}
+%unexpanded\def\tabl_tabulate_NG_first{\NC\tabl_tabulate_charalign}
+\unexpanded\def\tabl_tabulate_NG_first{\NC}
\unexpanded\def\tabl_tabulate_NN_first{\NC\tabl_tabulate_digits} % new, undocumented, test first
\unexpanded\def\tabl_tabulate_ND_first{\NC\tabl_tabulate_digits} % same, for old times sake