From fe6482d3468ca040e53f8e5347548495db754e98 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 26 Nov 2010 23:34:28 +0000
Subject: interfaces 2.4 (25nov10)

git-svn-id: svn://tug.org/texlive/trunk@20577 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/interfaces/interfaces-truncate.sty   | 46 +++++++++++++---------
 1 file changed, 27 insertions(+), 19 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/interfaces/interfaces-truncate.sty')

diff --git a/Master/texmf-dist/tex/latex/interfaces/interfaces-truncate.sty b/Master/texmf-dist/tex/latex/interfaces/interfaces-truncate.sty
index d3e3c069d44..7822dbdf80a 100644
--- a/Master/texmf-dist/tex/latex/interfaces/interfaces-truncate.sty
+++ b/Master/texmf-dist/tex/latex/interfaces/interfaces-truncate.sty
@@ -8,7 +8,7 @@
 %% 
 %% This is a generated file.
 %% 
-%% interfaces : 2010/11/21 v2.3 - interfaces : interfaces with keys for other packages (FC)
+%% interfaces : 2010/11/26 v2.4 - interfaces : interfaces with keys for other packages (FC)
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either
@@ -47,12 +47,14 @@
 \newrobustcmd\trunctext[3][\TruncateMarker]{% do nothing if width of #3 is less than #2
    \begingroup
       \hbadness\maxdimen\hfuzz\vsize
-      \setbox\z@=\hbox to\dimexpr#2\relax{\ignorespaces#3\unskip}%
-      \ifnum\badness>\@M
-            \def\next{\truncate[{#1}]{#2}{#3}}%
-      \else \def\next{#3}%
+      \setbox\z@=\hbox to\dimexpr#2\relax\bgroup\color@begingroup
+                                          \ignorespaces#3\unskip
+                                          \color@endgroup\egroup
+      \ifnum\badness>\@M \truncate[{#1}]{#2}{#3}%
+%%            \def\next{\truncate[{#1}]{#2}{#3}}%
+      \else #3%\def\next{#3}%
       \fi
-      \expandafter\endgroup\next
+   \endgroup
 }% \trunctext
 \newrobustcmd\htruncadjust[1]{\@testopt
    {\itf@htruncadjust{#1}}{}%
@@ -67,7 +69,9 @@
       {%
          \@for\x:=#3\do{%
             \advance \count@ \@ne
-            \setbox\z@=\hbox{\ignorespaces\x\unskip}%
+            \setbox\z@\hbox\bgroup\color@begingroup
+                              \ignorespaces\x\unskip
+                           \color@endgroup\egroup
             \dimen\count@ = \wd\z@
             \toks\count@\expandafter{\the\dimen\count@}%
             \advance\dimen@ \dimen\count@}%
@@ -86,18 +90,22 @@
    \itf@freespace\z@ % free space left when   w_i < x_i/sum(x_i) * total
    \@for\x:=#3\do{%
       \advance \count@ \@ne
-      \ifdim \dimen\count@<\z@ % not measured before
-            \setbox\z@=\hbox{\ignorespaces\x\unskip}%
-            \dimen\count@ = \wd\z@
-      \fi
-      \itf@tempdim = \itf@scaledimen{#1}*\the\toks\count@/\dimen@\relax
-      \ifdim \dimen\count@ > \itf@tempdim
-            \dimen\count@ = \itf@tempdim
-            \edef\itf@istruncated{\itf@istruncated,\the\count@}%
-            \advance\itf@sum by\the\toks\count@
-      \else
-         \advance\itf@freespace \itf@tempdim
-         \advance\itf@freespace -\dimen\count@
+      \ifdim\dimen@=\z@ \else
+         \ifdim \dimen\count@<\z@ % not measured before
+               \setbox\z@\hbox\bgroup\color@begingroup
+                                 \ignorespaces\x\unskip
+                                \color@endgroup\egroup
+               \dimen\count@ = \wd\z@
+         \fi
+         \itf@tempdim = \itf@scaledimen{#1}*\the\toks\count@/\dimen@\relax
+         \ifdim \dimen\count@ > \itf@tempdim
+               \dimen\count@ = \itf@tempdim
+               \edef\itf@istruncated{\itf@istruncated,\the\count@}%
+               \advance\itf@sum by\the\toks\count@
+         \else
+            \advance\itf@freespace \itf@tempdim
+            \advance\itf@freespace -\dimen\count@
+         \fi
       \fi
       \edef\itf@trunc@width{\itf@trunc@width\the\count@{\the@dimen\the\count@}}%
    }%
-- 
cgit v1.2.3

