summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-10-05 21:16:56 +0000
committerKarl Berry <karl@freefriends.org>2016-10-05 21:16:56 +0000
commitd8386a601069ef27d6bab8afc68b78b7c81151d3 (patch)
tree7842c23de2a687c9c3ba75b05df5241bbd2b936d /Master
parent3a791c3ce1d5a2f61d7e82669b386db5b86f6a52 (diff)
stackengine (5oct16)
git-svn-id: svn://tug.org/texlive/trunk@42215 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/stackengine/README3
-rw-r--r--Master/texmf-dist/doc/latex/stackengine/stackengine.pdfbin348655 -> 348559 bytes
-rw-r--r--Master/texmf-dist/doc/latex/stackengine/stackengine.tex6
-rw-r--r--Master/texmf-dist/tex/latex/stackengine/stackengine.sty56
4 files changed, 31 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/latex/stackengine/README b/Master/texmf-dist/doc/latex/stackengine/README
index 0c72d2dbe96..c954b3c977a 100644
--- a/Master/texmf-dist/doc/latex/stackengine/README
+++ b/Master/texmf-dist/doc/latex/stackengine/README
@@ -24,6 +24,9 @@ macros allow a wide variety of tasks, including:
This package can be set to process its arguments in either text mode or
in math mode.
+Steven B. Segletes
+steven.b.segletes.civ@mail.mil
+
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/Master/texmf-dist/doc/latex/stackengine/stackengine.pdf b/Master/texmf-dist/doc/latex/stackengine/stackengine.pdf
index 6c5b122e601..ba0eb91b209 100644
--- a/Master/texmf-dist/doc/latex/stackengine/stackengine.pdf
+++ b/Master/texmf-dist/doc/latex/stackengine/stackengine.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/stackengine/stackengine.tex b/Master/texmf-dist/doc/latex/stackengine/stackengine.tex
index 75097995270..9a870887ac2 100644
--- a/Master/texmf-dist/doc/latex/stackengine/stackengine.tex
+++ b/Master/texmf-dist/doc/latex/stackengine/stackengine.tex
@@ -63,12 +63,14 @@ examples to see this clearly.
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}
diff --git a/Master/texmf-dist/tex/latex/stackengine/stackengine.sty b/Master/texmf-dist/tex/latex/stackengine/stackengine.sty
index 226e2ef19e2..09a6a123e0c 100644
--- a/Master/texmf-dist/tex/latex/stackengine/stackengine.sty
+++ b/Master/texmf-dist/tex/latex/stackengine/stackengine.sty
@@ -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@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@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@char{ }}{\def\SEP@char{#1}}%
- \expandafter\define@processROW\expandafter{\SEP@char}%
-}
-\newcommand\define@processROW[1]{%
- \def\@processROW##1#1##2||{%
- \def\@preSEP{##1}%
- \def\@postSEP{##2}%
- }%
}
+
% FOR PROCESSING A GROUP OF STACK ROWS SEPARATED BY \SEP@char
+% EMPLOYS listofitems PACKAGE, AS OF V4.0
\newcommand\@readMANYrows[1]{%
- \togglefalse{@doneROWreads}%
- \edef\@postSEP{\unexpanded{#1}\expandonce{\SEP@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@char}%
+ \readlist*\stack@arg{#1}%
+ \xdef\stackengine@args{\stack@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@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@args}%
\def\@stacksign{-}%
\def\@stackcondition{\the@stackindex > 1}%
\else%
\setcounter{@stackindex}{1}%
\def\@stacksign{}%
- \def\@stackcondition{\the@stackindex < \narg}%
+ \def\@stackcondition{\the@stackindex < \stackengine@args}%
\fi%
\def\@STRT{}%
\if T\@strutlongstacks\if L#4\def\@STRT{\strut}\fi\fi%
\sbox{\stackedbox}{%
\@STRT\stack@delim\ignorespaces%
- \csname arg\romannumeral\the@stackindex\endcsname%
+ \stack@arg[\the@stackindex]%
\unskip\stack@delim}%
- \ifnum\narg>1%
+ \ifnum\stackengine@args>1%
\togglefalse{stackloop@done}%
\else%
\toggletrue{stackloop@done}%
@@ -286,11 +276,12 @@
\whileboolexpr{test {\nottoggle{stackloop@done}}}{%
\addtocounter{@stackindex}{\@stacksign 1}%
\stackengine{\csname#4stackgap\endcsname}%
- {\ignorespaces\csname arg\romannumeral\the@stackindex\endcsname\unskip}%
+ {\stack@arg[\the@stackindex]}%
{\usebox{\stackedbox}}{#3}{#1}{T}{\useanchorwidth}{#4}%
\ifnum\@stackcondition\else\toggletrue{stackloop@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@name content\endcsname}%
}{}%
\expandafter\sbox\csname\sv@name content\endcsname{#2}%
- \protected@edef#1{\usebox{\csname\sv@name content\endcsname}}%
+ \expandafter\def\expandafter#1\expandafter{\expandafter\usebox\expandafter%
+ {\csname\sv@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]{%