summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-30 22:25:14 +0000
committerKarl Berry <karl@freefriends.org>2016-11-30 22:25:14 +0000
commitfe071a3248b7f619d72c83bed1ac96acb78abbfe (patch)
treec165d98a7152b4ee85838219f0338ee74b11e22a /Master/texmf-dist/tex
parent311dd681df4643ad791a461e8c6287542a597034 (diff)
tabstackengine (30nov16)
git-svn-id: svn://tug.org/texlive/trunk@42610 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty37
1 files changed, 22 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty b/Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty
index 589e3e93795..977bc1bca08 100644
--- a/Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty
+++ b/Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty
@@ -1,4 +1,4 @@
-\def\tabstackengineversionnumber{V2.00}
+\def\tabstackengineversionnumber{V2.01}
%
% THIS MATERIAL IS SUBJECT TO THE LaTeX Project Public License
%
@@ -28,10 +28,16 @@
% -Employed a \toks based approach to parsing the argument, rather than the
% previous \protected@edef approach. The prior approach suffered problems
% when \\ was redefined, as in, for example, \centering or \raggedright.
+% V2.01 -Take advantage of listofitems revision to allow global \readlist, via
+% \greadlist. This allows \setsepchar to be placed inside of group, thus
+% preventing a global change in the listofitems \setsepchar.
+% -\TABcell and \TABcellBox modified to remember recent use of
+% \ensureTABstackMath, which otherwise changes temporarily the
+% prevailing mode and style of the TABstack.
\ProvidesPackage{tabstackengine}
-[2016/10/04 (\tabstackengineversionnumber) tabbed stacking]
+[2016/11/30 (\tabstackengineversionnumber) tabbed stacking]
\RequirePackage{stackengine}[2016-10-04]
-\RequirePackage{listofitems}
+\RequirePackage{listofitems}[2016/11/18]
\RequirePackage{etoolbox}
\newcounter{TABrowindex@}
@@ -65,7 +71,7 @@
\newcommand\readTABstack[1]{%
\expandafter\expandafter\expandafter\setsepchar\expandafter\expandafter%
\expandafter{\expandafter\SEP@char\expandafter/\TAB@char}%
- \readlist*\TABcellRaw{#1}%
+ \greadlist*\TABcellRaw{#1}%
\edef\TABstack@rows{\TABcellRawlen}%
\edef\TABstack@cols{\listlen\TABcellRaw[1]}%
\def\maxTABwd{0pt}%
@@ -90,6 +96,7 @@
\setbox0=\hbox{\stack@delim\TAB@delim{\@accumulatedTAB}\stack@delim}%
\csxdef{row\theTABrowindex@ TAB@ht}{\the\ht0}%
\csxdef{row\theTABrowindex@ TAB@dp}{\the\dp0}%
+ \global\let\recent@TAB@delim\TAB@delim%
}%
}
@@ -99,14 +106,14 @@
\newcommand\TABstrut[1]{\ifnum#1<1\relax{}\else%
\protect\rule[-\TABdp{#1}]{0pt}{\dimexpr\TABdp{#1}+\TABht{#1}\relax}\fi}
-\newcommand\TABcell[2]{\stack@delim\TAB@delim{\TABcellRaw[#1,#2]}\stack@delim}
+\newcommand\TABcell[2]{\stack@delim\recent@TAB@delim{\TABcellRaw[#1,#2]}\stack@delim}
\newcommand\TABcellBox[3][\relax]{\ifx\relax#1\relax%
- \TABcellBoxaux{\csuse{col#3TAB@stackalignment}}{#2}{#3}\else
- \TABcellBoxaux{#1}{#2}{#3}\fi}
+ \TABcellBox@aux{\csuse{col#3TAB@stackalignment}}{#2}{#3}\else
+ \TABcellBox@aux{#1}{#2}{#3}\fi}
-\newcommand\TABcellBoxaux[3]{\makebox[\TABwd{#3}][#1]{\stack@delim%
- \TAB@delim{\TAB@strutL{#2}\TABcellRaw[#2,#3]\TAB@strutR{#2}}\stack@delim}}
+\newcommand\TABcellBox@aux[3]{\makebox[\TABwd{#3}][#1]{\stack@delim%
+ \recent@TAB@delim{\TAB@strutL{#2}\TABcellRaw[#2,#3]\TAB@strutR{#2}}\stack@delim}}
\newcommand\TABcells[1]{\listlen\TABcellRaw[#1]}
@@ -119,8 +126,10 @@
\let\TABbinaryRight\TABunaryLeft
\let\TABbinaryLeft\TABunaryRight
-\newcommand\TABstackMath{\renewcommand\TAB@delim[1]{\ensuremath{\TAB@mathstyle##1}}}
-\newcommand\TABstackText{\renewcommand\TAB@delim[1]{\TAB@textstyle##1}}
+\newcommand\TABstackMath{\renewcommand\TAB@delim[1]{\ensuremath{\TAB@mathstyle##1}}%
+ \let\recent@TAB@delim\TAB@delim}
+\newcommand\TABstackText{\renewcommand\TAB@delim[1]{\TAB@textstyle##1}%
+ \let\recent@TAB@delim\TAB@delim}
\newcommand\TABstackMathstyle[1]{\renewcommand\TAB@mathstyle{#1}}
\newcommand\TABstackTextstyle[1]{\renewcommand\TAB@textstyle{#1}}
\newcommand\clearTABstyle{\renewcommand\TAB@textstyle{}\renewcommand\TAB@mathstyle{}}
@@ -193,9 +202,8 @@
\newcommand\vertMatrixstack[2][\stackalignment]{%
\ensureTABstackMath{\left|\@TAB@stack{#1}{#2}{D}{\Vectorstack}\right|}}
-\newcommand\@TAB@stack[4]{%
+\newcommand\@TAB@stack[4]{\bgroup%
\readTABstack{#2}%
- \bgroup%
\edef\stackalignment{#1}%
\setcounter{TABcolindex@}{0}%
\whileboolexpr{test {\ifnumless{\theTABcolindex@}{\TABstack@cols}}}{% COL LOOP
@@ -248,11 +256,10 @@
\newcommand\tabularstackanchor[4][\stackgap]{%
\@TABstackonunder{#1}{#3}{#4}{#2}{\stackanchor}}
-\newcommand\@TABstackonunder[5]{%
+\newcommand\@TABstackonunder[5]{\bgroup%
\def\TAB@tmp{#2}%
\expandafter\g@addto@macro\expandafter\TAB@tmp\expandafter{\SEP@char#3}%
\readTABstack{\TAB@tmp}%
- \bgroup%
\setcounter{TABcolindex@}{0}%
\whileboolexpr{test {\ifnumless{\theTABcolindex@}{\TABstack@cols}}}{% COL LOOP
\stepcounter{TABcolindex@}%