summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.pdfbin562549 -> 569190 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.tex89
-rw-r--r--Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty37
3 files changed, 89 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.pdf b/Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.pdf
index 68b8d116cdb..c288ddfd20f 100644
--- a/Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.pdf
+++ b/Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.tex b/Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.tex
index f4a448f4029..fa4be38a47b 100644
--- a/Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.tex
+++ b/Master/texmf-dist/doc/latex/tabstackengine/tabstackengine.tex
@@ -459,7 +459,7 @@ This macro may be independently called by the user to read TABstack data
EOL-separated data that would otherwise be used to construct a stack.%
\footnote{Alternately, TABstacking data can be read without generating a
TABstack by using the \texttt{\cmd renewcommand\cmd quietstack\{T\}}
- setting of \ste{} to suppress the stack output, without supressing its
+ setting of \ste{} to suppress the stack output, without suppressing its
construction.}
If the routine is not called independently by the user, data from the most
recent TABstacking operation is still available for interrogation.
@@ -467,7 +467,7 @@ If the routine is not called independently by the user, data from the most
Take the example
\vb|\TABstackMath\TABstackMathstyle{\displaystyle}\setstackgap{S}{5pt}%|\\
-\vb|\alignShortstack{\frac{A}{Q}x=&B\\ C= &\frac{Dx}{2}\\E=&F}}|
+\vb|\alignShortstack{\frac{A}{Q}x=&B\\ C= &\frac{Dx}{2}\\E=&F}|
which presents as
@@ -497,7 +497,16 @@ Here, use the macro \vb|\TABcellRaw[2,1]|\margcmd{TABcellRaw}, which will
\fbox{\TABcellRaw[2,1]}
If one would like to see the cell data presented in the prevailing
- (\textsf{tab})\ste{} mode and style, the macro
+ (\textsf{tab})\ste{} mode and style%
+\footnote{Note that both \cmd{TABcell} and, as described later,
+ \cmd{TABcellBox} present in the \textit{prevailing} TABstack mode and
+ style.
+ While a recent use of \cmd{ensureTABstackMath} will be remembered,
+ intervening declarations of \cmd{TABstackMath}, \cmd{TABstackText} and
+ their associated styles will change the \textit{prevailing} mode
+ and style in which subsequent \cmd{TABcell} and \cmd{TABcellBox}
+ are processed.}%
+ , the macro
\vb|\TABcell{2}{1}|\margcmd{TABcell} may be used (again shown in
an \vb|\fbox|):
@@ -546,16 +555,14 @@ However, even for long stacks, the height of the top row and the depth of
If one wishes to recover the \textit{actual tokens} that were employed in a
given TABstack cell (rather that just something that will \textit{expand}
to those tokens), that can be accomplished in one of two ways.
-The macro \vb|\TABcellRaw[]| can be expanded twice in the manner of
+The macro \vb|\TABcellRaw[,]| can be expanded twice in the manner of
\end{sloppypar}
-\vb|\expandafter\detokenize%|\\
-\vb|\expandafter\expandafter\expandafter{\TABcellRaw[2,2]}|
+\vb|\detokenize\expandafter\expandafter\expandafter{\TABcellRaw[2,2]}|
-\expandafter\detokenize%
-\expandafter\expandafter\expandafter{\TABcellRaw[2,2]}
+\detokenize\expandafter\expandafter\expandafter{\TABcellRaw[2,2]}
-Alternately, the macro \vb|\getTABcelltoks[]|\margcmd{getTABcelltoks} will
+Alternately, the macro \vb|\getTABcelltoks[,]|\margcmd{getTABcelltoks} will
produce a token list named \vb|\TABcelltoks|\margcmd{the\cmd TABcelltoks} that
contains the cell's tokens:
@@ -566,16 +573,16 @@ Alternately, the macro \vb|\getTABcelltoks[]|\margcmd{getTABcelltoks} will
In summary then, \tst{} cell content can be accessed in a number of ways:\\
\renewcommand\arraystretch{1.2}
-\begin{tabular}{@{}l@{~--~}p{3.5in}@{}}
-\vb|\TABcellRaw| & expands into the tokens of the cell\\
-\vb|\TABcell| & presents the cell content in the prevailing mode (text
+\begin{tabular}{@{}l@{~--~}p{3.3in}@{}}
+\vb|\TABcellRaw[,]| & expands into the tokens of the cell\\
+\vb|\TABcell{}{}| & presents the cell content in the prevailing mode (text
or math) and style set by \ste{} and \tst{}\\
-\vb|\TABcellBox| & presents the cell content, in the prevailing mode
+\vb|\TABcellBox{}{}| & presents the cell content, in the prevailing mode
and style, strutted to the proper row height/depth, set in a box of the
proper cell width, flanked by the appropriate \vb|{}| groups defined by
\tst's unary and/or binary declarations,
and (when knowable) set in the proper \texttt{lcr} alignment\\
-\vb|\getTABcelltoks| & creates a token list register \vb|\TABcelltoks|
+\vb|\getTABcelltoks[,]| & creates a token list register \vb|\TABcelltoks|
that contains the actual tokens employed in the cell, accessible by
way of \vb|\the\TABcelltoks|
\end{tabular}
@@ -584,6 +591,11 @@ In summary then, \tst{} cell content can be accessed in a number of ways:\\
Consider the example
+\vb|\setstacktabbedgap{.5em}|\\
+\vb|\tabbedLongstack{a & b & c & d\\ e & f & g & h\\ i & j & k & l}|
+
+which produces
+
\setstacktabbedgap{.5em}
\tabbedLongstack{a & b & c & d\\ e & f & g & h & H\\ i & j & k & l}
@@ -605,22 +617,55 @@ $\textrm{Columns} = \vb|\TABcells{1}| = \TABcells{1}$
Note that \tst{} uses the number of columns provided in row 1 to determine the
dimensions of the subsequent TABstack.
If the 2nd or 3rd rows of the above stack were [accidentally] defined with 5
- columns of data, the last column would be ignored, since the 1st row only
- has 4 columns.
-However, in that case, \vb|\TABcells{2}| would, in fact, yield \TABcells{2}.
-
-
+ columns of data, the 5th column of data would be ignored during the TABstack
+ construction, since the 1st row only has 4 columns.
+However, in that case, \vb|\TABcells{2}| would still, in fact, yield
+ \TABcells{2}.
-\section{Absent Features}
+\section{Absent Features/Tricky Syntax}
-\textbf{Nothing Equivalent to} \vb|\hline| or \vb`|`
+\textbf{1. Nothing Equivalent to} \vb|\hline| or \vb`|`
-This is not a bug, so much as a notation of a missing feature. Currently
+This is not a bug, but rather a notation of a missing feature. Currently
there is nothing equivalent to \vb|\hline| available for use in
\tst{} arguments.
Furthermore, vertical lines may \textbf{not} be added to a tabular stack
with the use of \vb`|` elements in the column specifier.
+\textbf{2. Empty Items Are Not Ignored (by Default)}
+
+The \loi{} package used to parse TABstack input, does not, by default,
+ ignore empty items.
+This can cause parsing errors, if not understood properly.
+Take, for example, the well formed TABstack invocation,
+
+\vb|\tabularLongstack{rc}{11&12\\21&22\\31&32}|.
+
+Adding a trailing \vb|\\| to the input, as in:
+
+\vb|\tabularLongstack{rc}{11&12\\21&22\\31&32\\}|,
+
+however, breaks the parsing because 2 columns of data are expected
+ following the final \vb|\\| (even though such syntax is accepted
+ in, for example, the \texttt{tabular} environment).
+This syntax can be immediately made acceptable by
+ invoking the \loi{} declaration \cmd{ignoreemptyitems}, in which case
+ the final [empty] row is discarded.
+However, that approach can introduce a new set of problems, because
+ it will then ignore actual blank input that was intended, as in the
+ case of this example, in which table cell (2,2) is intentionally
+ left blank:
+
+\vb|\tabularLongstack{rc}{11&12\\21&\\31&32\\}|.
+
+To make this latter case work, when empty items are ignored, an
+ empty group would need be explicitly inserted:
+
+\vb|\tabularLongstack{rc}{11&12\\21&{}\\31&32\\}|.
+
+These problems can be wholly avoided if care is used in the
+ construction of TABstack input.
+
\endvbdelim
\section*{Acknowledgements}
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@}%