From 70f7efc1e0d5452cb21eb12ad1207da4267d6b73 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 28 Mar 2009 00:39:28 +0000
Subject: xiftehn update (27mar09)

git-svn-id: svn://tug.org/texlive/trunk@12546 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/xifthen/xifthen.sty | 30 +++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

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

diff --git a/Master/texmf-dist/tex/latex/xifthen/xifthen.sty b/Master/texmf-dist/tex/latex/xifthen/xifthen.sty
index ba973cd60ab..9a456251790 100644
--- a/Master/texmf-dist/tex/latex/xifthen/xifthen.sty
+++ b/Master/texmf-dist/tex/latex/xifthen/xifthen.sty
@@ -1,7 +1,5 @@
-% $Date: 2007-04-21 17:11:50 +0200 (Sat, 21 Apr 2007) $
-% $Revision: 28 $
-\def \filedate    {2007/04/21}%
-\def \fileversion {v1.1}%
+\def \filedate    {2009/03/23}%
+\def \fileversion {v1.2}%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{xifthen}%
   [\filedate \space \fileversion \space Extended ifthen features]
@@ -11,6 +9,30 @@
 \RequirePackage{ifthen}
 \RequirePackage{ifmtarg}
 
+% First of all, \TE@repl (ifthen) needs to be patched. (v1.2)
+%   (viz. \newtest{\superlogique}[1]{\(\NOT#1\AND\boolean{true}\)})
+%   Pointed out by MPG and Pierre Albar\`ede [19 Mar 2009]
+
+\def \TE@repl #1#2{%
+  \long \def \@tempc ##1#1##2{%
+    \def \@tempb{\@tempc}%
+    \begingroup % Thanks MPG
+      \toks@ {##2}%
+      \edef \@tempa {\the \toks@}
+    \expandafter \endgroup
+    \ifx \@tempa \@tempb
+      \toks@ \expandafter {\the \toks@ ##1}%
+      \expandafter \@gobble
+    \else
+      \toks@ \expandafter {\the \toks@ ##1#2}%
+      \expandafter \@tempc
+    \fi
+    ##2%
+  }%
+  \toks@ \expandafter {\expandafter}%
+  \expandafter \@tempc \the \toks@ #1\@tempc
+}
+
 % \cnttest {<counter expression>} {<relation>} {<counter expression>}
 %
 \newcommand*{\TE@cnttest}[4]{%
-- 
cgit v1.2.3

