summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:01:59 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:01:59 +0000
commit9a5618e990e6945051d19626b7b56c587e15b506 (patch)
tree13cf2ede4f4966238041b5b26f4b5b580795f5a0 /Master/texmf-dist/tex/latex
parentb947be239b40a6eaec6083a561bf347ff84385e9 (diff)
pbox
git-svn-id: svn://tug.org/texlive/trunk@1177 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/pbox/pbox.sty61
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pbox/pbox.sty b/Master/texmf-dist/tex/latex/pbox/pbox.sty
new file mode 100644
index 00000000000..d93146d20b9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pbox/pbox.sty
@@ -0,0 +1,61 @@
+%%
+%% This is file `pbox.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pbox.dtx (with options: `style')
+%%
+%% Copyright (C) 2003 Simon Law
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pbox}[2003/04/06 v1.0 Dynamic parboxes]
+\RequirePackage{calc}
+\RequirePackage{ifthen}
+\newcommand{\settominwidth}[3][\columnwidth]{%
+ \settowidth{#2}{\begin{tabular}{@{}l@{}}#3\end{tabular}}%
+ \ifthenelse{\lengthtest{#1<#2}}{\setlength{#2}{#1}}}
+\newcommand{\widthofpbox}[1]{%
+ \widthof{\begin{tabular}{@{}l@{}}#1\end{tabular}}}
+\DeclareRobustCommand*{\pbox}[1][]{%
+ \def\pb@xargi{#1}%
+ \pb@xi}
+\DeclareRobustCommand*{\pb@xi}[1][]{%
+ \def\pb@xargii{#1}%
+ \pb@xii}
+\DeclareRobustCommand*{\pb@xii}[1][]{%
+ \def\pb@xargiii{#1}%
+ \pb@xiii}
+\newlength{\pb@xlen}
+\DeclareRobustCommand{\pb@xiii}[2]{%
+ \settominwidth[#1]{\pb@xlen}{#2}%
+ \ifthenelse{\equal{\pb@xargi}{}}
+ {\parbox{\pb@xlen}{#2}}
+ {\ifthenelse{\equal{\pb@xargii}{}}
+ {\ifthenelse{\equal{\pb@xargiii}{}}
+ {\parbox[\pb@xargi]{\pb@xlen}{#2}}
+ {\parbox[\pb@xargi][][\pb@xargiii]{\pb@xlen}{#2}}}
+ {\ifthenelse{\equal{\pb@xargiii}{}}
+ {\parbox[\pb@xargi][\pb@xargii]{\pb@xlen}{#2}}
+ {\parbox[\pb@xargi][\pb@xargii][\pb@xargiii]{\pb@xlen}{#2}}}}%
+ \def\pb@xargi\relax
+ \def\pb@xargii\relax
+ \def\pb@xargiii\relax
+ \makebox[0pt]{}}
+\endinput
+%%
+%% End of file `pbox.sty'.