summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stringstrings
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-18 18:06:16 +0000
committerKarl Berry <karl@freefriends.org>2010-04-18 18:06:16 +0000
commit3f7e0725352fcc9339a279ceffc6e0404e216844 (patch)
tree00320c6db451f7246cc5162def2ed60eaf935625 /Master/texmf-dist/tex/latex/stringstrings
parent1965064413bcfbb6a41e311fe7231eb2969590c8 (diff)
stringstrings update (16apr10)
git-svn-id: svn://tug.org/texlive/trunk@17906 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stringstrings')
-rw-r--r--Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty68
1 files changed, 67 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty b/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
index e41ca502baf..5e40274e207 100644
--- a/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
+++ b/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\ProvidesPackage{stringstrings}
-[2009/11/02 v1.10
+[2010/02/23 v1.20
Extensive array of string manipulation routines for
cosmetic and programming application]
\NeedsTeXFormat{LaTeX2e}
@@ -105,6 +105,21 @@
\def\EncodedDollar{\EscapeChar\DollarCode}
\def\Dollar{\symbol{36}}
+\def\UvariCode{W}
+\def\EncodedUvari{\EscapeChar\UvariCode}
+\def\Uvari{Uvari}
+\let\uvari\EncodedUvari
+
+\def\UvariiCode{X}
+\def\EncodedUvarii{\EscapeChar\UvariiCode}
+\def\Uvarii{Uvarii}
+\let\uvarii\EncodedUvarii
+
+\def\UvariiiCode{Y}
+\def\EncodedUvariii{\EscapeChar\UvariiiCode}
+\def\Uvariii{Uvariii}
+\let\uvariii\EncodedUvariii
+
\def\CaratCode{2}
\def\EncodedCarat{\EscapeChar\CaratCode}
\def\Carat{\symbol{94}}
@@ -384,6 +399,36 @@
\let\ss\SaveEszett%
}
+\newcommand\encodetoken[2][1]{%
+ \if 1#1%
+ \let\Uvari#2%
+ \let#2\uvari\else
+ \if 2#1%
+ \let\Uvarii#2%
+ \let#2\uvarii\else
+ \if 3#1%
+ \let\Uvariii#2%
+ \let#2\uvariii%
+ \fi
+ \fi
+ \fi
+}
+
+\newcommand\decodetoken[2][1]{%
+ \if 1#1%
+ \let#2\Uvari%
+ \def\Uvari{Uvari}\else
+ \if 2#1%
+ \let#2\Uvarii%
+ \def\Uvarii{Uvarii}\else
+ \if 3#1%
+ \let#2\Uvariii%
+ \def\Uvariii{Uvariii}%
+ \fi
+ \fi
+ \fi
+}
+
%%%%% COMMANDS TO MANIPULATE STRINGS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\substring[4][v]{\+%
@@ -1047,6 +1092,9 @@
%%%%% SUPPORT ROUTINES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\ESCrotate[1]{%
+ \if\UvariCode#1\@uvariaction\else
+ \if\UvariiCode#1\@uvariiaction\else
+ \if\UvariiiCode#1\@uvariiiaction\else
\if\@fromcode#1\@tostring\else
\if\PipeCode#1\@pipeaction\else
\if\DollarCode#1\@dollaraction\else
@@ -1128,6 +1176,9 @@
\fi
\fi
\fi
+ \fi
+ \fi
+ \fi
}
\newcommand\@getnextword[2][v]{%
@@ -1141,6 +1192,12 @@
\isnextbyte[q]{\EscapeChar}{#1}%
\if T\theresult%
\edef\@ESCcode{\expandafter\@gobble#1}%
+ \if\UvariCode\@ESCcode%
+ \expandafter\def\csname#2\endcsname{\Uvari}\else
+ \if\UvariiCode\@ESCcode%
+ \expandafter\def\csname#2\endcsname{\Uvarii}\else
+ \if\UvariiiCode\@ESCcode%
+ \expandafter\def\csname#2\endcsname{\Uvariii}\else
\if\PipeCode\@ESCcode%
\expandafter\def\csname#2\endcsname{\Pipe}\else
\if\DollarCode\@ESCcode%
@@ -1239,6 +1296,9 @@
\fi
\fi
\fi
+ \fi
+ \fi
+ \fi
\else
\expandafter\ifx\expandafter\&#1%
\expandafter\def\csname#2\endcsname{\&}\else
@@ -1260,6 +1320,9 @@
\edef\@blankaction{\EncodedBlankSpace}%
\def\@dollaraction{\EncodedDollar}%
\def\@pipeaction{\EncodedPipe}%
+ \def\@uvariaction{\EncodedUvari}%
+ \def\@uvariiaction{\EncodedUvarii}%
+ \def\@uvariiiaction{\EncodedUvariii}%
\def\@carataction{\EncodedCarat}%
\def\@circumflexaction{\EncodedCircumflex}%
\def\@tildeaction{\EncodedTilde}%
@@ -1317,6 +1380,9 @@
\def\@blankaction{\BlankSpace}%
\def\@dollaraction{\Dollar}%
\def\@pipeaction{\Pipe}%
+ \def\@uvariaction{\Uvari}%
+ \def\@uvariiaction{\Uvarii}%
+ \def\@uvariiiaction{\Uvariii}%
\def\@carataction{\Carat}%
\def\@circumflexaction{\Circumflex}%
\def\@tildeaction{\Tilde}%