texlive[42215] Master/texmf-dist: stackengine (5oct16)
commits+karl at tug.org
commits+karl at tug.org
Wed Oct 5 23:16:56 CEST 2016
Revision: 42215
http://tug.org/svn/texlive?view=revision&revision=42215
Author: karl
Date: 2016-10-05 23:16:56 +0200 (Wed, 05 Oct 2016)
Log Message:
-----------
stackengine (5oct16)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/stackengine/README
trunk/Master/texmf-dist/doc/latex/stackengine/stackengine.pdf
trunk/Master/texmf-dist/doc/latex/stackengine/stackengine.tex
trunk/Master/texmf-dist/tex/latex/stackengine/stackengine.sty
Modified: trunk/Master/texmf-dist/doc/latex/stackengine/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/stackengine/README 2016-10-05 21:16:43 UTC (rev 42214)
+++ trunk/Master/texmf-dist/doc/latex/stackengine/README 2016-10-05 21:16:56 UTC (rev 42215)
@@ -24,7 +24,10 @@
This package can be set to process its arguments in either text mode or
in math mode.
+Steven B. Segletes
+steven.b.segletes.civ at mail.mil
+
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
of this license or (at your option) any later version.
Modified: trunk/Master/texmf-dist/doc/latex/stackengine/stackengine.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/stackengine/stackengine.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/stackengine/stackengine.tex 2016-10-05 21:16:43 UTC (rev 42214)
+++ trunk/Master/texmf-dist/doc/latex/stackengine/stackengine.tex 2016-10-05 21:16:56 UTC (rev 42215)
@@ -63,12 +63,14 @@
Notice the consistent inter-item gap on a short stack:
\Huge
-\Shortstack{{\fbox{t}} {\fbox{y}} {\fbox{k}} {\fbox{e}}}
+\Shortstack{{\fbox{t}} {\fbox{y}} {\fbox{k}} {\fbox{e}}}%
+{\quad\setstackgap{S}{\dimexpr.4ex+1.2pt}\Shortstack{t y k e}}
\normalsize
Notice the consistent inter-baseline spacing on a long stack:
\Huge
-\Longstack{{{\rl t}} {{\rl y}} {{\rl k}} {{\rl e}}}
+\Longstack{{{\rl t}} {{\rl y}} {{\rl k}} {{\rl e}}}%
+{\quad\Longstack{t y k e}}
\normalsize\\
\begin{sloppypar}
Modified: trunk/Master/texmf-dist/tex/latex/stackengine/stackengine.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stackengine/stackengine.sty 2016-10-05 21:16:43 UTC (rev 42214)
+++ trunk/Master/texmf-dist/tex/latex/stackengine/stackengine.sty 2016-10-05 21:16:56 UTC (rev 42215)
@@ -1,6 +1,6 @@
-\def\stackengineversionnumber{v3.26}
+\def\stackengineversionnumber{v4.00}
\ProvidesPackage{stackengine}
-[2016/07/28 \stackengineversionnumber\
+[2016/10/04 \stackengineversionnumber\
Stacking text and objects in convenient ways]
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -71,7 +71,11 @@
% V3.25 -Default longstack gap is now \normalbaselineskip, so as to
% automatically work in tabular environments.
% V3.26 -V3.25 on partially fixed the problem of \normalbaselineskip.
+% V4.00 -Incorporate listofitems package methodology for parsing, requiring
+% some package rewrite, primarily macro \@readMANYrows.
+% -Eliminated all uses of \protected at edef.fxf
\RequirePackage{etoolbox}
+\RequirePackage{listofitems}% REQUIRES listofitems.sty AND listofitems.tex
\usepackage{calc}
\newtoggle{@doneROWreads}
@@ -93,34 +97,19 @@
\lowercase{\endgroup\def\removebs#1{\if#1|\else#1\fi}}
\newcommand{\stack at macro@name}[1]{\expandafter\removebs\string#1}
-%% Following 3 macros were, in V3.2, made robust with the help of
+%% Following macro was, in V3.2, made robust with the help of
%% Prof. Enrico Gregorio. See:
%% http://tex.stackexchange.com/questions/137298/
\newcommand\setstackEOL[1]{%
\ifstrempty{#1}{\def\SEP at char{ }}{\def\SEP at char{#1}}%
- \expandafter\define at processROW\expandafter{\SEP at char}%
}
-\newcommand\define at processROW[1]{%
- \def\@processROW##1#1##2||{%
- \def\@preSEP{##1}%
- \def\@postSEP{##2}%
- }%
-}
+
% FOR PROCESSING A GROUP OF STACK ROWS SEPARATED BY \SEP at char
+% EMPLOYS listofitems PACKAGE, AS OF V4.0
\newcommand\@readMANYrows[1]{%
- \togglefalse{@doneROWreads}%
- \edef\@postSEP{\unexpanded{#1}\expandonce{\SEP at char}}%
- \setcounter{ROWcellindex@}{0}%
- \whileboolexpr{test {\nottoggle{@doneROWreads}}}{%
- \stepcounter{ROWcellindex@}%
- \expandafter\@processROW\@postSEP||%
- \expandafter\ifstrempty\expandafter{\@postSEP}{%
- \toggletrue{@doneROWreads}%
- }{}%
- \csedef{arg\romannumeral\theROWcellindex@}{\expandonce{\@preSEP}}%
- }%
-% \narg GIVES HOW MANY ROWS WERE PROCESSED
- \xdef\narg{\arabic{ROWcellindex@}}%
+ \expandafter\setsepchar\expandafter{\SEP at char}%
+ \readlist*\stack at arg{#1}%
+ \xdef\stackengine at args{\stack at arglen}%
}
%%%%%
@@ -148,7 +137,7 @@
\newcommand{\setstackgap}[2]{\@namedef{#1stackgap}{#2}}
\newcommand\stackgap{\@nameuse{\if S\stacktype S\else L\fi stackgap}\relax}
\setstackgap{S}{3pt}% SHORTSTACKING GAP BETWEEN ITEMS (SAME AS \shortstack)
-\setstackgap{L}{\normalbaselineskip}% LONGSTACKING GAP BETWEEN ITEMS (def. \normalbaselineskip)
+\setstackgap{L}{\normalbaselineskip}% LONGSTACKING BASELINESKIP (\normalbaselineskip)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fi
\ifstackengine at usestackEOL%
@@ -262,23 +251,24 @@
\newcommand*\Longunderstack[2][\stackalignment]{\@stack{#1}{#2}{U}{L}}
\newcommand*\@stack[4]{%
+ \bgroup% SO AS NOT TO INTERFERE WITH loi's \setsepchar
\@readMANYrows{#2}%
\if U#3%
- \setcounter{@stackindex}{\narg}%
+ \setcounter{@stackindex}{\stackengine at args}%
\def\@stacksign{-}%
\def\@stackcondition{\the at stackindex > 1}%
\else%
\setcounter{@stackindex}{1}%
\def\@stacksign{}%
- \def\@stackcondition{\the at stackindex < \narg}%
+ \def\@stackcondition{\the at stackindex < \stackengine at args}%
\fi%
\def\@STRT{}%
\if T\@strutlongstacks\if L#4\def\@STRT{\strut}\fi\fi%
\sbox{\stackedbox}{%
\@STRT\stack at delim\ignorespaces%
- \csname arg\romannumeral\the at stackindex\endcsname%
+ \stack at arg[\the at stackindex]%
\unskip\stack at delim}%
- \ifnum\narg>1%
+ \ifnum\stackengine at args>1%
\togglefalse{stackloop at done}%
\else%
\toggletrue{stackloop at done}%
@@ -286,11 +276,12 @@
\whileboolexpr{test {\nottoggle{stackloop at done}}}{%
\addtocounter{@stackindex}{\@stacksign 1}%
\stackengine{\csname#4stackgap\endcsname}%
- {\ignorespaces\csname arg\romannumeral\the at stackindex\endcsname\unskip}%
+ {\stack at arg[\the at stackindex]}%
{\usebox{\stackedbox}}{#3}{#1}{T}{\useanchorwidth}{#4}%
\ifnum\@stackcondition\else\toggletrue{stackloop at done}\fi%
}%
\if F\quietstack\usebox{\stackedbox}\fi%
+ \egroup%
}
% PERHAPS THESE SIX MACROS CAN BE REPLACED BY \toplap AND \bottomlap
@@ -342,15 +333,16 @@
\expandafter\newsavebox\expandafter{\csname\sv at name content\endcsname}%
}{}%
\expandafter\sbox\csname\sv at name content\endcsname{#2}%
- \protected at edef#1{\usebox{\csname\sv at name content\endcsname}}%
+ \expandafter\def\expandafter#1\expandafter{\expandafter\usebox\expandafter%
+ {\csname\sv at name content\endcsname}}%
}
\newcommand*\addstackgap[2][\Sstackgap]{\stackengine{#1}{%
\stackengine{#1}{#2}{}{O}{c}{\quietstack}{T}{S}}{}{U}{c}{\quietstack}{T}{S}}
-\newcommand*\topinset[4]{\stackinset{\stackalignment}{#4}{t}{#3}{#1}{#2}}
+\newcommand*\topinset[4]{\stackinset{\stackalignment}{#4}{t}{#3}{#1}{#2}}% DEPRECATED
-\newcommand*\bottominset[4]{\stackinset{\stackalignment}{#4}{b}{#3}{#1}{#2}}
+\newcommand*\bottominset[4]{\stackinset{\stackalignment}{#4}{b}{#3}{#1}{#2}}% DEPRECATED
%\stackinset{l/c/r}{x}{b/c/t}{y}{inset}{anchor}
\newcommand*\stackinset[6]{%
More information about the tex-live-commits
mailing list