texlive[45215] Master/texmf-dist: eqparbox (4sep17)

commits+karl at tug.org commits+karl at tug.org
Mon Sep 4 23:45:19 CEST 2017


Revision: 45215
          http://tug.org/svn/texlive?view=revision&revision=45215
Author:   karl
Date:     2017-09-04 23:45:19 +0200 (Mon, 04 Sep 2017)
Log Message:
-----------
eqparbox (4sep17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/eqparbox/README
    trunk/Master/texmf-dist/doc/latex/eqparbox/eqparbox.pdf
    trunk/Master/texmf-dist/source/latex/eqparbox/eqparbox.dtx
    trunk/Master/texmf-dist/source/latex/eqparbox/eqparbox.ins
    trunk/Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty

Modified: trunk/Master/texmf-dist/doc/latex/eqparbox/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/eqparbox/README	2017-09-04 21:45:06 UTC (rev 45214)
+++ trunk/Master/texmf-dist/doc/latex/eqparbox/README	2017-09-04 21:45:19 UTC (rev 45215)
@@ -41,7 +41,7 @@
 Copyright and license
 ---------------------
 
-Copyright (C) 2013 Scott Pakin, scott+eqp at pakin.org
+Copyright (C) 2017 Scott Pakin, scott+eqp at pakin.org
 
 This package may be distributed and/or modified under the conditions
 of the LaTeX Project Public License, either version 1.3c of this

Modified: trunk/Master/texmf-dist/doc/latex/eqparbox/eqparbox.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/eqparbox/eqparbox.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/eqparbox/eqparbox.dtx	2017-09-04 21:45:06 UTC (rev 45214)
+++ trunk/Master/texmf-dist/source/latex/eqparbox/eqparbox.dtx	2017-09-04 21:45:19 UTC (rev 45215)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2013 Scott Pakin <scott+eqp at pakin.org>
+% Copyright (C) 2017 Scott Pakin <scott+eqp at pakin.org>
 % ----------------------------------------------------
 %
 % This package may be distributed and/or modified under the
@@ -20,7 +20,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{eqparbox}
 %<*package>
-    [2013/03/15 v4.0 Create equal-widthed boxes]
+    [2017/09/03 v4.1 Create equal-widthed boxes]
 %</package>
 %
 %<*driver>
@@ -62,7 +62,7 @@
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-% \CheckSum{474}
+% \CheckSum{536}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -88,17 +88,14 @@
 %
 % \GetFileInfo{eqparbox.dtx}
 %
-% \DoNotIndex{\\}
-% \DoNotIndex{\@auxout,\@cons,\@ifnextchar,\@ifundefined,\@ne}
-% \DoNotIndex{\@tempdima,\@tempboxa}
-% \DoNotIndex{\advance,\begin,\begingroup,\bgroup,\box}
-% \DoNotIndex{\csname,\DeclareRobustCommand,\def}
-% \DoNotIndex{\egroup,\else,\end,\endcsname,\endgroup,\expandafter}
-% \DoNotIndex{\fi,\gdef,\global}
-% \DoNotIndex{\hbox,\ifdim,\ifx,\immediate,\let,\m at ne,\mbox}
-% \DoNotIndex{\newcommand,\newdimen,\newif,\newlength,\noexpand}
-% \DoNotIndex{\relax,\romannumeral}
-% \DoNotIndex{\sbox,\setbox,\space,\string,\the,\wd,\xdef,\z@}
+% \DoNotIndex{\@auxout,\@cons,\@ifnextchar,\@ifundefined,\@ne,\@tempboxa}
+% \DoNotIndex{\@tempdima,\DeclareRobustCommand,\\,\advance,\begin}
+% \DoNotIndex{\begingroup,\bgroup,\box,\csname,\def,\egroup,\else,\end}
+% \DoNotIndex{\endcsname,\endgroup,\expandafter,\fi,\gdef,\global,\hbox}
+% \DoNotIndex{\ifdim,\ifnum,\ifx,\immediate,\let,\long,\m at ne,\mbox}
+% \DoNotIndex{\newcommand,\newdimen,\newif,\newlength,\noexpand,\relax}
+% \DoNotIndex{\renewcommand,\renewenvironment,\romannumeral,\sbox,\setbox}
+% \DoNotIndex{\space,\string,\the,\wd,\xdef,\z@}
 %
 % ^^A  The following environment, which typesets a declaration of a command
 % ^^A  in a box set out into the margin, was copied almost verbatim from
@@ -346,7 +343,7 @@
 % various box widths to stabilize.
 %
 % \begin{decl}
-% |\eqboxwidth|
+% |\eqboxwidth| \marg{tag}
 % \end{decl}
 %
 % It is sometimes useful to take the width of a box produced by one of
@@ -500,7 +497,7 @@
 %   \begin{tabular}{c|c}
 %     \textbf{Meeting date} & \textbf{Topics discussed} \\
 %     \hline
-%     2013-02-22
+%     2017-02-22
 %     & \eqparbox{topiclist}{^^A
 %         \begin{enumerate}
 %           \item Hardware upgrades
@@ -509,7 +506,7 @@
 %         \end{enumerate}
 %       }^^A
 %     \\ \hline
-%     2013-03-01
+%     2017-03-01
 %     & \eqparbox{topiclist}{^^A
 %         \begin{enumerate}
 %           \item Printer low on toner
@@ -517,7 +514,7 @@
 %         \end{enumerate}
 %     }^^A
 %     \\ \hline
-%     2013-03-08
+%     2017-03-08
 %     & \eqparbox{topiclist}{^^A
 %         \begin{enumerate}
 %           \item Product to ship next week
@@ -529,7 +526,7 @@
 % \end{table}
 %
 % \begin{verbatim}
-%     2013-02-22 & \eqparbox{topiclist}{%
+%     2017-02-22 & \eqparbox{topiclist}{%
 %                    \begin{enumerate}
 %                      \item Hardware upgrades
 %                      \item Barbara's retirement
@@ -1052,9 +1049,9 @@
         }%
 %    \end{macrocode}
 % To measure the width of a |list| we introduce a single-column
-% |tabular| that includes |\eqp at list@indent|'s worth of padding ($\sum$
-% |\leftmargin|~$+$ |\rightmargin|~$+$ |\itemindent|) to mimic the width
-% of the original |list| environment.
+% |tabular| that includes |\eqp at list@indent|'s worth of padding
+% ($=$~|\leftmargin|~$+$ |\rightmargin|~$+$ |\itemindent|)
+% to mimic the width of the original |list| environment.
 %    \begin{macrocode}
         \hspace*{-\eqp at list@indent}%
         \advance\eqp at list@indent by \leftmargin
@@ -1114,7 +1111,7 @@
 % |\eqp at next@|\meta{tag} works the same way but is always initialized
 % to~|0.0pt|.  It represents the maximum width to assume in
 % \emph{subsequent} |latex| runs.  It is needed to detect whether the
-% dest text with tag \meta{tag} has been removed/shrunk.  At the end of
+% widest text with tag \meta{tag} has been removed/shrunk.  At the end of
 % a run, \pkgname{eqparbox} prepares the next run (via the~|.aux| file)
 % to initialize |\eqp at this@|\meta{tag} to the final value of
 % |\eqp at next@|\meta{tag}.
@@ -1146,10 +1143,11 @@
   \expandafter
   \ifx\csname eqp at this@#1\endcsname\relax
 %    \end{macrocode}
-% If we get here, then we've never encountered tag \meta{tag}, even in a
-% previous |latex| run.  We request that the user re-run |latex| This is
-% not always necessary (e.g.,~when all uses of the |\eqparbox| with tag
-% \meta{tag} are left-justified), but it's better to be safe than sorry.
+% If we get here, then we've never encountered tag \meta{tag}, even in
+% a previous |latex| run.  We request that the user re-run |latex|.
+% This is not always necessary (e.g.,~when all uses of the |\eqparbox|
+% with tag \meta{tag} are left-justified), but it's better to be safe
+% than sorry.
 %    \begin{macrocode}
     \global\eqp at must@reruntrue
     \expandafter\xdef\csname eqp at this@#1\endcsname{\the\eqp at tempdimb}%
@@ -1194,6 +1192,47 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\eqp at set@min at width}
+% Given a tag and a textual length, ensure that |\eqp at this@|\meta{tag}
+% represents a width of at least \meta{length}.
+% \changes{v4.1}{2017/09/03}{Introduced this helper macro for
+%   \texttt{\string\string\string\eqsetminwidth} and
+%   \texttt{\string\string\string\eqsetminwidthto}}
+%    \begin{macrocode}
+\def\eqp at set@min at width#1#2{%
+  \expandafter\ifx\csname eqp at this@#1\endcsname\relax
+%    \end{macrocode}
+% If we get here, then we've never encountered tag \meta{tag}, even in
+% a previous |latex| run.  We assign a value to \meta{tag} and request
+% that the user re-run |latex|.
+%    \begin{macrocode}
+    \global\eqp at must@reruntrue
+    \expandafter\xdef\csname eqp at this@#1\endcsname{#2}%
+    \expandafter\xdef\csname eqp at next@#1\endcsname{#2}%
+  \else
+%    \end{macrocode}
+% If we get here, then we \emph{have} previously seen tag \meta{tag}.
+% We ensure its width is at least~|#2|.
+%    \begin{macrocode}
+    \eqp at tempdima=\csname eqp at this@#1\endcsname\relax
+    \eqp at tempdimb=#2\relax
+    \ifdim\eqp at tempdima<\eqp at tempdimb
+      \expandafter\xdef\csname eqp at this@#1\endcsname{\the\eqp at tempdimb}%
+    \fi
+    \eqp at tempdima=\csname eqp at next@#1\endcsname\relax
+    \ifdim\eqp at tempdima<\eqp at tempdimb
+      \expandafter\xdef\csname eqp at next@#1\endcsname{\the\eqp at tempdimb}%
+    \fi
+  \fi
+  \@ifundefined{eqp at seen@#1}{%
+    \expandafter\gdef\csname eqp at seen@#1\endcsname{}%
+    \@cons\eqp at taglist{{#1}}%
+  }{}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
 % \subsection{Author macros}
 %
 % \begin{macro}{\eqparbox}
@@ -1459,10 +1498,14 @@
 % the user wants the associated box to be no narrower than the given
 % length.
 % \changes{v4.0}{2013/03/04}{Introduced this macro}
+% \changes{v4.1}{2017/09/03}{Define
+%   \texttt{\string\string\string\eqp at this@}\meta{tag} and
+%   \texttt{\string\string\string\eqp at next@}\meta{tag} appropriately}
 %    \begin{macrocode}
 \newcommand{\eqsetminwidth}[2]{%
   \@tempdima=#2\relax
   \expandafter\xdef\csname eqp at minwd@#1\endcsname{\the\@tempdima}%
+  \eqp at set@min at width{#1}{\csname eqp at minwd@#1\endcsname}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -1485,10 +1528,14 @@
 % records that the user wants the associated box to be no narrower than
 % the text, typeset at its natural width.
 % \changes{v4.0}{2013/03/04}{Introduced this macro}
+% \changes{v4.1}{2017/09/03}{Define
+%   \texttt{\string\string\string\eqp at this@}\meta{tag} and
+%   \texttt{\string\string\string\eqp at next@}\meta{tag} appropriately}
 %    \begin{macrocode}
 \newcommand{\eqsetminwidthto}[2]{%
   \eqp at settowidth{\@tempdima}{#2}%
   \expandafter\xdef\csname eqp at minwd@#1\endcsname{\the\@tempdima}%
+  \eqp at set@min at width{#1}{\csname eqp at minwd@#1\endcsname}%
 }
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/eqparbox/eqparbox.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/eqparbox/eqparbox.ins	2017-09-04 21:45:06 UTC (rev 45214)
+++ trunk/Master/texmf-dist/source/latex/eqparbox/eqparbox.ins	2017-09-04 21:45:19 UTC (rev 45215)
@@ -3,7 +3,7 @@
 %% driver files from the doc files in this package when run through
 %% LaTeX or TeX.
 %%
-%% Copyright (C) 2013 Scott Pakin <scott+eqp at pakin.org>
+%% Copyright (C) 2017 Scott Pakin <scott+eqp at pakin.org>
 %% -------------------------------------------------------
 %%
 %% This package may be distributed and/or modified under the
@@ -26,7 +26,7 @@
 
 This is a generated file.
 
-Copyright (C) 2013 Scott Pakin <scott+eqp at pakin.org>
+Copyright (C) 2017 Scott Pakin <scott+eqp at pakin.org>
 -------------------------------------------------------
 
 This package may be distributed and/or modified under the

Modified: trunk/Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty	2017-09-04 21:45:06 UTC (rev 45214)
+++ trunk/Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty	2017-09-04 21:45:19 UTC (rev 45215)
@@ -8,7 +8,7 @@
 %% 
 %% This is a generated file.
 %% 
-%% Copyright (C) 2013 Scott Pakin <scott+eqp at pakin.org>
+%% Copyright (C) 2017 Scott Pakin <scott+eqp at pakin.org>
 %% -------------------------------------------------------
 %% 
 %% This package may be distributed and/or modified under the
@@ -21,7 +21,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{eqparbox}
-    [2013/03/15 v4.0 Create equal-widthed boxes]
+    [2017/09/03 v4.1 Create equal-widthed boxes]
 \newlength{\eqp at tempdima}
 \newlength{\eqp at tempdimb}
 \def\eqp at taglist{}
@@ -132,6 +132,27 @@
   \eqp at tempdima=\csname eqp at this@#1\endcsname\relax
   \eqp at produce@box{\eqp at tempdima}{#2}%
 }
+\def\eqp at set@min at width#1#2{%
+  \expandafter\ifx\csname eqp at this@#1\endcsname\relax
+    \global\eqp at must@reruntrue
+    \expandafter\xdef\csname eqp at this@#1\endcsname{#2}%
+    \expandafter\xdef\csname eqp at next@#1\endcsname{#2}%
+  \else
+    \eqp at tempdima=\csname eqp at this@#1\endcsname\relax
+    \eqp at tempdimb=#2\relax
+    \ifdim\eqp at tempdima<\eqp at tempdimb
+      \expandafter\xdef\csname eqp at this@#1\endcsname{\the\eqp at tempdimb}%
+    \fi
+    \eqp at tempdima=\csname eqp at next@#1\endcsname\relax
+    \ifdim\eqp at tempdima<\eqp at tempdimb
+      \expandafter\xdef\csname eqp at next@#1\endcsname{\the\eqp at tempdimb}%
+    \fi
+  \fi
+  \@ifundefined{eqp at seen@#1}{%
+    \expandafter\gdef\csname eqp at seen@#1\endcsname{}%
+    \@cons\eqp at taglist{{#1}}%
+  }{}%
+}
 \DeclareRobustCommand{\eqparbox}{%
   \@ifnextchar[%]
     {\eqparbox at i}%
@@ -212,6 +233,7 @@
 \newcommand{\eqsetminwidth}[2]{%
   \@tempdima=#2\relax
   \expandafter\xdef\csname eqp at minwd@#1\endcsname{\the\@tempdima}%
+  \eqp at set@min at width{#1}{\csname eqp at minwd@#1\endcsname}%
 }
 \newcommand{\eqsetmaxwidth}[2]{%
   \@tempdima=#2\relax
@@ -220,6 +242,7 @@
 \newcommand{\eqsetminwidthto}[2]{%
   \eqp at settowidth{\@tempdima}{#2}%
   \expandafter\xdef\csname eqp at minwd@#1\endcsname{\the\@tempdima}%
+  \eqp at set@min at width{#1}{\csname eqp at minwd@#1\endcsname}%
 }
 \newcommand{\eqsetmaxwidthto}[2]{%
   \eqp at settowidth{\@tempdima}{#2}%



More information about the tex-live-commits mailing list