diff options
author | Karl Berry <karl@freefriends.org> | 2014-02-20 23:10:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-02-20 23:10:33 +0000 |
commit | 476d676a816ee6b8b116b2a0b4e49d69aabd6f56 (patch) | |
tree | 75f7b6abae60fc4a01d80572c46a128a4c1ed847 /Master/texmf-dist/tex/latex/tabstackengine | |
parent | 30ee1d84a554811d5fef2188b46f0a1fdc2e8e73 (diff) |
tabstackengine (19feb14)
git-svn-id: svn://tug.org/texlive/trunk@33006 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tabstackengine')
-rw-r--r-- | Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty | 64 |
1 files changed, 52 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty b/Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty index 511bad54eb9..94a5428de67 100644 --- a/Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty +++ b/Master/texmf-dist/tex/latex/tabstackengine/tabstackengine.sty @@ -1,13 +1,21 @@ -\def\tabstackengineversionnumber{V1.00} +\def\tabstackengineversionnumber{V1.10} % % tabstackengine initial release % % THIS MATERIAL IS SUBJECT TO THE LaTeX Project Public License % -% V1.00 - Adopted beta version 0.21 as initial release version 1.0 +% V1.00 -Adopted beta version 0.21 as initial release version 1.0 +% V1.10 -Corrected unary/binary problem for left end of tabbed cell content; +% -Added \TABunaryLeft (\TABbinaryRight) for " cell{} "; +% added \TABunaryRight (\TABbinaryLeft) for " {}cell "; +% added \TABbinary for " {}cell{} "; +% The default is \TABunaryLeft (V1.00 wrongly equivalent to \TABbinary) +% This removes need to brace unary negatives at lead of cell. +% -Corrected bug of trailing \frac, noted in V1.00, by adding a +% \relax to definition of \@postTAB in \readTABrow. % \ProvidesPackage{tabstackengine} -[2014/02/11 (\tabstackengineversionnumber) tabbed stacking] +[2014/02/19 (\tabstackengineversionnumber) tabbed stacking] \RequirePackage[usestackEOL]{stackengine}[2013-10-15] \RequirePackage{calc} @@ -32,7 +40,7 @@ \newcommand\readTABrow[2]{% \edef\row@ID{#1}% \togglefalse{@doneTABreads}% - \edef\@postTAB{\unexpanded{#2}\expandonce{\TAB@char}}% + \edef\@postTAB{\unexpanded{#2\relax}\expandonce{\TAB@char}}% \setcounter{TABcellindex@}{0}% \whileboolexpr{ test {\nottoggle{@doneTABreads}}}{% \stepcounter{TABcellindex@}% @@ -61,6 +69,38 @@ \global\csedef{@#1TABtextblob}{\expandonce\@accumulatedTAB}% } +\def\p@Tstrut#1{\protect\TABstrut{#1}} + +\newcommand\TABunaryLeft{% + \def\TAB@strutLeftA{}% + \def\TAB@strutRightA{\p@Tstrut{i}}% + \def\TAB@strutLeftB{}% + \def\TAB@strutRightB{\p@Tstrut{ii}}% + \def\TAB@strutLeftC{}% + \def\TAB@strutRightC{\p@Tstrut{\TAB@prefix}}% +} +\let\TABbinaryRight\TABunaryLeft + +\newcommand\TABunaryRight{% + \def\TAB@strutLeftA{\p@Tstrut{i}}% + \def\TAB@strutRightA{}% + \def\TAB@strutLeftB{\p@Tstrut{ii}}% + \def\TAB@strutRightB{}% + \def\TAB@strutLeftC{\p@Tstrut{\TAB@prefix}}% + \def\TAB@strutRightC{}% +} +\let\TABbinaryLeft\TABunaryRight + +\newcommand\TABbinary{% + \def\TAB@strutLeftA{{}}% + \def\TAB@strutRightA{\p@Tstrut{i}}% + \def\TAB@strutLeftB{{}}% + \def\TAB@strutRightB{\p@Tstrut{ii}}% + \def\TAB@strutLeftC{{}}% + \def\TAB@strutRightC{\p@Tstrut{\TAB@prefix}}% +} +\TABunaryLeft + \newcommand\TAB@delim[1]{#1}% \newcommand\TABstackMath{% \renewcommand\TAB@delim[1]{\ensuremath{##1}}% @@ -162,9 +202,9 @@ \setcounter{TABcellindex@}{0}% \whileboolexpr{test {\ifnumless{\theTABcellindex@}{\TABcells{i}}}}{% \def\col@stack{% - \protect\TABstrut{i}% + \TAB@strutLeftA% \TABcell{i}{\theTABcellindex@}% - \protect\TABstrut{i}% + \TAB@strutRightA% }% \stepcounter{TABcellindex@}% \@getTABalignment{#3}{\theTABcellindex@}% @@ -176,9 +216,9 @@ \stepcounter{TAB@stackindex}% \edef\TAB@prefix{\roman{TAB@stackindex}}% \protected@edef\col@stack{\col@stack\SEP@char% - \protect\TABstrut{\TAB@prefix}% + \TAB@strutLeftC% \TABcell{\TAB@prefix}{\theTABcellindex@}% - \protect\TABstrut{\TAB@prefix}% + \TAB@strutRightC% }% }% \iftoggle{fixed@TABwidth}% @@ -230,10 +270,10 @@ }{\add@TAB@gap{#4}{\theTABcellindex@}}{}% \iftoggle{fixed@TABwidth}% {\makebox[\the\maxTAB@width][\stackalignment]{% - #5[#1]{\TABstrut{i}\TABcell{i}{\theTABcellindex@}\TABstrut{i}}% - {\TABstrut{ii}\TABcell{ii}{\theTABcellindex@}\TABstrut{ii}}}}% - {#5[#1]{\TABstrut{i}\TABcell{i}{\theTABcellindex@}\TABstrut{i}}% - {\TABstrut{ii}\TABcell{ii}{\theTABcellindex@}\TABstrut{ii}}}% + #5[#1]{\TAB@strutLeftA\TABcell{i}{\theTABcellindex@}\TAB@strutRightA}% + {\TAB@strutLeftB\TABcell{ii}{\theTABcellindex@}\TAB@strutRightB}}}% + {#5[#1]{\TAB@strutLeftA\TABcell{i}{\theTABcellindex@}\TAB@strutRightA}% + {\TAB@strutLeftB\TABcell{ii}{\theTABcellindex@}\TAB@strutRightB}}% }% \let\stackalignment\sv@stackalignment% } |