summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/eqparbox
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/eqparbox')
-rw-r--r--Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty73
1 files changed, 52 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty b/Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty
index e4f36bb0b92..690ea06ad9d 100644
--- a/Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty
+++ b/Master/texmf-dist/tex/latex/eqparbox/eqparbox.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2004 Scott Pakin <scott+eqp@pakin.org>
+%% Copyright (C) 2010 Scott Pakin <scott+eqp@pakin.org>
%% -------------------------------------------------------
%%
%% This package may be distributed and/or modified under the
@@ -16,13 +16,12 @@
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.2 or later is part of all distributions of LaTeX
-%% version 1999/12/01 or later.
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008/05/04 or later.
%%
-%% File: eqparbox.dtx Copyright (C) 2004 Scott Pakin <scott+eqp@pakin.org>
-\NeedsTeXFormat{LaTeX2e}
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{eqparbox}
- [2004/08/02 v2.1 Create equal-widthed parboxes]
+ [2010/01/01 v3.1 Create equal-widthed boxes]
\newlength{\eqp@tempdima} \newlength{\eqp@tempdimb}
\def\eqp@taglist{}
\newif\ifeqp@must@rerun
@@ -67,7 +66,7 @@
\end{tabular}%
}}%
}
-\DeclareRobustCommand\eqparbox{%
+\DeclareRobustCommand{\eqparbox}{%
\@ifnextchar[%]
{\eqparbox@i}%
{\eqparbox@iii[c][\relax][s]}%
@@ -82,30 +81,62 @@
{\eqparbox@iii[#1][#2]}%
{\eqparbox@iii[#1][#2][#1]}%
}
-\def\eqparbox@iii[#1][#2][#3]#4#5{%
- \eqp@settowidth{\eqp@tempdimb}{#5}%
+\def\eqparbox@iii[#1][#2][#3]{%
+ \gdef\eqp@produce@box##1##2{%
+ \parbox[#1][#2][#3]{##1}{##2}%
+ }%
+ \eqp@compute@width
+}
+\DeclareRobustCommand{\eqmakebox}{%
+ \@ifnextchar[%]
+ {\eqlrbox@i\makebox}%
+ {\makebox}%
+}
+\DeclareRobustCommand{\eqframebox}{%
+ \@ifnextchar[%]
+ {\eqlrbox@i\framebox}%
+ {\framebox}%
+}
+\DeclareRobustCommand{\eqsavebox}[1]{%
+ \@ifnextchar[%]
+ {\eqlrbox@i{\savebox{#1}}}%
+ {\savebox{#1}}%
+}
+\def\eqlrbox@i#1[#2]{%
+ \@ifnextchar[%]
+ {\eqlrbox@ii{#1}[#2]}%
+ {\eqlrbox@ii{#1}[#2][c]}%
+}
+\def\eqlrbox@ii#1[#2][#3]{%
+ \gdef\eqp@produce@box##1##2{%
+ #1[##1][#3]{##2}%
+ }%
+ \eqp@compute@width{#2}%
+}
+\def\eqp@compute@width#1#2{%
+ \eqp@settowidth{\eqp@tempdimb}{#2}%
\expandafter
- \ifx\csname eqp@this@#4\endcsname\relax
+ \ifx\csname eqp@this@#1\endcsname\relax
\global\eqp@must@reruntrue
- \expandafter\xdef\csname eqp@this@#4\endcsname{\the\eqp@tempdimb}%
- \expandafter\xdef\csname eqp@next@#4\endcsname{\the\eqp@tempdimb}%
+ \expandafter\xdef\csname eqp@this@#1\endcsname{\the\eqp@tempdimb}%
+ \expandafter\xdef\csname eqp@next@#1\endcsname{\the\eqp@tempdimb}%
\else
- \eqp@tempdima=\csname eqp@this@#4\endcsname\relax
+ \eqp@tempdima=\csname eqp@this@#1\endcsname\relax
\ifdim\eqp@tempdima<\eqp@tempdimb
- \expandafter\xdef\csname eqp@this@#4\endcsname{\the\eqp@tempdimb}%
+ \expandafter\xdef\csname eqp@this@#1\endcsname{\the\eqp@tempdimb}%
\global\eqp@must@reruntrue
\fi
- \eqp@tempdima=\csname eqp@next@#4\endcsname\relax
+ \eqp@tempdima=\csname eqp@next@#1\endcsname\relax
\ifdim\eqp@tempdima<\eqp@tempdimb
- \expandafter\xdef\csname eqp@next@#4\endcsname{\the\eqp@tempdimb}%
+ \expandafter\xdef\csname eqp@next@#1\endcsname{\the\eqp@tempdimb}%
\fi
\fi
- \@ifundefined{eqp@seen@#4}{%
- \expandafter\gdef\csname eqp@seen@#4\endcsname{}%
- \@cons\eqp@taglist{{#4}}%
+ \@ifundefined{eqp@seen@#1}{%
+ \expandafter\gdef\csname eqp@seen@#1\endcsname{}%
+ \@cons\eqp@taglist{{#1}}%
}{}%
- \eqp@tempdima=\csname eqp@this@#4\endcsname\relax
- \parbox[#1][#2][#3]{\eqp@tempdima}{#5}%
+ \eqp@tempdima=\csname eqp@this@#1\endcsname\relax
+ \eqp@produce@box{\eqp@tempdima}{#2}%
}
\newcommand*{\eqboxwidth}[1]{%
\@ifundefined{eqp@this@#1}{0pt}{\csname eqp@this@#1\endcsname}%