summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/stringstrings/README4
-rw-r--r--Master/texmf-dist/doc/latex/stringstrings/stringstrings.pdfbin436354 -> 436700 bytes
-rw-r--r--Master/texmf-dist/source/latex/stringstrings/stringstrings.dtx49
-rw-r--r--Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty46
4 files changed, 57 insertions, 42 deletions
diff --git a/Master/texmf-dist/doc/latex/stringstrings/README b/Master/texmf-dist/doc/latex/stringstrings/README
index b423e7d339f..17f0911ad61 100644
--- a/Master/texmf-dist/doc/latex/stringstrings/README
+++ b/Master/texmf-dist/doc/latex/stringstrings/README
@@ -17,8 +17,4 @@ Run `stringstrings.ins' through LaTeX to produce stringstrings.sty
from stringstrings.dtx.
Run `stringstrings.dtx' through LaTeX to produce the documentation.
-This program can be redistributed and/or modified, with attribution.
-
- Steven Segletes <steven@arl.army.mil>
- 28 March 2008
diff --git a/Master/texmf-dist/doc/latex/stringstrings/stringstrings.pdf b/Master/texmf-dist/doc/latex/stringstrings/stringstrings.pdf
index 39965b19565..13684086f65 100644
--- a/Master/texmf-dist/doc/latex/stringstrings/stringstrings.pdf
+++ b/Master/texmf-dist/doc/latex/stringstrings/stringstrings.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/stringstrings/stringstrings.dtx b/Master/texmf-dist/source/latex/stringstrings/stringstrings.dtx
index 6d9ffa57194..24baeeda9c6 100644
--- a/Master/texmf-dist/source/latex/stringstrings/stringstrings.dtx
+++ b/Master/texmf-dist/source/latex/stringstrings/stringstrings.dtx
@@ -1,6 +1,6 @@
% \iffalse
%<package>\ProvidesPackage{stringstrings}
-%<package>[2013/04/24 v1.22
+%<package>[2015/02/02 v1.23
%<package> Extensive array of string manipulation routines for
%<package> cosmetic and programming application]
%<package>\NeedsTeXFormat{LaTeX2e}
@@ -30,6 +30,9 @@
% v1.20 -Added ability to encode/decode arbitrary tokens
% v1.21 -Added %, removing extra space (bug) from \whereisword
% v1.22 -Added %, removing extra space (bug) from \getargs
+% v1.23 -Changed {~} to {\ } in \retokenizechar
+% -Forced all stringtest commands to function outside of math mode
+% which will give correct result, when invoked within math mode.
\documentclass{ltxdoc}
\usepackage{stringstrings}
\DisableCrossrefs
@@ -2804,6 +2807,7 @@
% RESULT STORED IN BOOLEAN \ifmatchingchar
\newif\ifmatchingchar
\newcommand\testmatchingchar[3]{%
+ \setbox0=\hbox{%
% \end{macrocode}
% Extract desired character from test string
% \begin{macrocode}
@@ -2829,15 +2833,15 @@
% No, we are comparing a normal character against a multi-byte symbol
% (apples and oranges), a false comparison.
% \begin{macrocode}
- \matchingcharfalse%
+ \global\matchingcharfalse%
\fi
\else
% \end{macrocode}
% No, we are comparing two normal one-byte characters, not a mult-byte
% character.
% \begin{macrocode}
- \if \thestring#3\matchingchartrue\else\matchingcharfalse\fi
- \fi
+ \if \thestring#3\global\matchingchartrue\else\global\matchingcharfalse\fi
+ \fi}
\?}
% \end{macrocode}
% \end{macro}
@@ -2850,6 +2854,7 @@
% \begin{macrocode}
\newif\ifcapitalized
\newcommand\testcapitalized[1]{\+%
+ \setbox0=\hbox{%
\isnextbyte[q]{\EscapeChar}{#1}%
\if T\theresult%
\def\EncodingTreatment{e}%
@@ -2888,7 +2893,7 @@
% altered the string
% \begin{macrocode}
\ifthenelse{\equal{\@stringA}{\@stringB}}%
- {\capitalizedfalse}{\capitalizedtrue}\?%
+ {\global\capitalizedfalse}{\global\capitalizedtrue}}\?%
\defaultTreatments%
}
% \end{macrocode}
@@ -2901,6 +2906,7 @@
% \begin{macrocode}
\newif\ifuncapitalized
\newcommand\testuncapitalized[1]{\+%
+ \setbox0=\hbox{%
\isnextbyte[q]{\EscapeChar}{#1}%
\if T\theresult%
\def\EncodingTreatment{e}%
@@ -2918,7 +2924,7 @@
\edef\@stringB{\@rotate{#1}}%
\fi
\ifthenelse{\equal{\@stringA}{\@stringB}}%
- {\uncapitalizedfalse}{\uncapitalizedtrue}\?%
+ {\global\uncapitalizedfalse}{\global\uncapitalizedtrue}}\?%
\defaultTreatments%
}
% \end{macrocode}
@@ -2955,6 +2961,7 @@
% \begin{macrocode}
\newif\ifuppercase
\newcommand\testuppercase[1]{%
+ \setbox0=\hbox{%
% \end{macrocode}
% Strip all non-alphabetic characters. Save as |\@stringA|.
% \begin{macrocode}
@@ -2977,13 +2984,13 @@
% \begin{macrocode}
\@getstringlength{\@stringA}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\uppercasefalse}{\uppercasetrue}%
+ {\global\uppercasefalse}{\global\uppercasetrue}%
}%
% \end{macrocode}
% If strings are not equal, then the alphabetic characters of the
% original string were not all uppercase. Test false.
% \begin{macrocode}
- {\uppercasefalse}%
+ {\global\uppercasefalse}}%
\defaultTreatments%
}
% \end{macrocode}
@@ -2996,6 +3003,7 @@
% \begin{macrocode}
\newif\ifsolelyuppercase
\newcommand\testsolelyuppercase[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\solelyuppercase[e]{#1}%
@@ -3005,9 +3013,9 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\solelyuppercasefalse}{\solelyuppercasetrue}%
+ {\global\solelyuppercasefalse}{\global\solelyuppercasetrue}%
}%
- {\solelyuppercasefalse}%
+ {\global\solelyuppercasefalse}}%
\defaultTreatments%
}
% \end{macrocode}
@@ -3019,19 +3027,20 @@
% \begin{macrocode}
\newif\iflowercase
\newcommand\testlowercase[1]{%
+ \setbox0=\hbox{%
\Treatments{1}{1}{0}{0}{0}{0}%
\substring[e]{#1}{1}{\@MAXSTRINGSIZE}%
\edef\@stringA{\thestring}%
\def\AlphaCapsTreatment{2}%
\substring[e]{#1}{1}{\@MAXSTRINGSIZE}%
\edef\@stringB{\thestring}%
- \ifthenelse{\equal{\@stringA}{\@stringB}}%
+ \ifthenelse{\equal{\@stringA}{\@stringB}}%
{%
\@getstringlength{\@stringA}{@stringsize}%
- \ifthenelse{\value{@stringsize} = 0}%
- {\lowercasefalse}{\lowercasetrue}%
+ \ifnum\value{@stringsize}= 0\relax%
+ \global\lowercasefalse\else\global\lowercasetrue\fi%
}%
- {\lowercasefalse}%
+ {\global\lowercasefalse}}%
\defaultTreatments%
}
% \end{macrocode}
@@ -3043,6 +3052,7 @@
% \begin{macrocode}
\newif\ifsolelylowercase
\newcommand\testsolelylowercase[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\solelylowercase[e]{#1}%
@@ -3052,9 +3062,9 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\solelylowercasefalse}{\solelylowercasetrue}%
+ {\global\solelylowercasefalse}{\global\solelylowercasetrue}%
}%
- {\solelylowercasefalse}%
+ {\global\solelylowercasefalse}}%
\defaultTreatments%
}
% \end{macrocode}
@@ -3067,6 +3077,7 @@
% \begin{macrocode}
\newif\ifalphabetic
\newcommand\testalphabetic[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\alphabetic[e]{#1}%
@@ -3076,9 +3087,9 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\alphabeticfalse}{\alphabetictrue}%
+ {\global\alphabeticfalse}{\global\alphabetictrue}%
}%
- {\alphabeticfalse}%
+ {\global\alphabeticfalse}}%
\defaultTreatments%
}
% \end{macrocode}
@@ -3334,7 +3345,7 @@
\expandafter\def\csname#2\endcsname{\%}\else
\expandafter\ifx\expandafter\##1%
\expandafter\def\csname#2\endcsname{\#}\else
- \if\EncodedBlankSpace#1\expandafter\def\csname#2\endcsname{~}\else
+ \if\EncodedBlankSpace#1\expandafter\def\csname#2\endcsname{\ }\else
\expandafter\edef\csname#2\endcsname{#1}%
\fi
\fi
diff --git a/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty b/Master/texmf-dist/tex/latex/stringstrings/stringstrings.sty
index 00dc8f8d251..ecfb1d2f4e1 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}
-[2013/04/24 v1.22
+[2015/02/02 v1.23
Extensive array of string manipulation routines for
cosmetic and programming application]
\NeedsTeXFormat{LaTeX2e}
@@ -925,6 +925,7 @@
\newif\ifmatchingchar
\newcommand\testmatchingchar[3]{%
+ \setbox0=\hbox{%
\substring[e]{#1}{#2}{#2}\+%
\isnextbyte[q]{\EscapeChar}{#3}%
\if T\theresult%
@@ -934,15 +935,16 @@
\edef\@teststring{\@DiscardNextChar{\thestring}}%
\if \@teststring\@testcode\matchingchartrue\else\matchingcharfalse\fi
\else
- \matchingcharfalse%
+ \global\matchingcharfalse%
\fi
\else
- \if \thestring#3\matchingchartrue\else\matchingcharfalse\fi
- \fi
+ \if \thestring#3\global\matchingchartrue\else\global\matchingcharfalse\fi
+ \fi}
\?}
\newif\ifcapitalized
\newcommand\testcapitalized[1]{\+%
+ \setbox0=\hbox{%
\isnextbyte[q]{\EscapeChar}{#1}%
\if T\theresult%
\def\EncodingTreatment{e}%
@@ -960,12 +962,13 @@
\edef\@stringB{\@rotate{#1}}%
\fi
\ifthenelse{\equal{\@stringA}{\@stringB}}%
- {\capitalizedfalse}{\capitalizedtrue}\?%
+ {\global\capitalizedfalse}{\global\capitalizedtrue}}\?%
\defaultTreatments%
}
\newif\ifuncapitalized
\newcommand\testuncapitalized[1]{\+%
+ \setbox0=\hbox{%
\isnextbyte[q]{\EscapeChar}{#1}%
\if T\theresult%
\def\EncodingTreatment{e}%
@@ -983,7 +986,7 @@
\edef\@stringB{\@rotate{#1}}%
\fi
\ifthenelse{\equal{\@stringA}{\@stringB}}%
- {\uncapitalizedfalse}{\uncapitalizedtrue}\?%
+ {\global\uncapitalizedfalse}{\global\uncapitalizedtrue}}\?%
\defaultTreatments%
}
@@ -1004,6 +1007,7 @@
\newif\ifuppercase
\newcommand\testuppercase[1]{%
+ \setbox0=\hbox{%
\Treatments{1}{1}{0}{0}{0}{0}%
\substring[e]{#1}{1}{\@MAXSTRINGSIZE}%
\edef\@stringA{\thestring}%
@@ -1014,14 +1018,15 @@
{%
\@getstringlength{\@stringA}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\uppercasefalse}{\uppercasetrue}%
+ {\global\uppercasefalse}{\global\uppercasetrue}%
}%
- {\uppercasefalse}%
+ {\global\uppercasefalse}}%
\defaultTreatments%
}
\newif\ifsolelyuppercase
\newcommand\testsolelyuppercase[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\solelyuppercase[e]{#1}%
@@ -1031,32 +1036,34 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\solelyuppercasefalse}{\solelyuppercasetrue}%
+ {\global\solelyuppercasefalse}{\global\solelyuppercasetrue}%
}%
- {\solelyuppercasefalse}%
+ {\global\solelyuppercasefalse}}%
\defaultTreatments%
}
\newif\iflowercase
\newcommand\testlowercase[1]{%
+ \setbox0=\hbox{%
\Treatments{1}{1}{0}{0}{0}{0}%
\substring[e]{#1}{1}{\@MAXSTRINGSIZE}%
\edef\@stringA{\thestring}%
\def\AlphaCapsTreatment{2}%
\substring[e]{#1}{1}{\@MAXSTRINGSIZE}%
\edef\@stringB{\thestring}%
- \ifthenelse{\equal{\@stringA}{\@stringB}}%
+ \ifthenelse{\equal{\@stringA}{\@stringB}}%
{%
\@getstringlength{\@stringA}{@stringsize}%
- \ifthenelse{\value{@stringsize} = 0}%
- {\lowercasefalse}{\lowercasetrue}%
+ \ifnum\value{@stringsize}= 0\relax%
+ \global\lowercasefalse\else\global\lowercasetrue\fi%
}%
- {\lowercasefalse}%
+ {\global\lowercasefalse}}%
\defaultTreatments%
}
\newif\ifsolelylowercase
\newcommand\testsolelylowercase[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\solelylowercase[e]{#1}%
@@ -1066,14 +1073,15 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\solelylowercasefalse}{\solelylowercasetrue}%
+ {\global\solelylowercasefalse}{\global\solelylowercasetrue}%
}%
- {\solelylowercasefalse}%
+ {\global\solelylowercasefalse}}%
\defaultTreatments%
}
\newif\ifalphabetic
\newcommand\testalphabetic[1]{%
+ \setbox0=\hbox{%
\stringencode{#1}%
\edef\@stringA{\thestring}%
\alphabetic[e]{#1}%
@@ -1083,9 +1091,9 @@
\noblanks[q]{\@stringA}%
\@getstringlength{\thestring}{@stringsize}%
\ifthenelse{\value{@stringsize} = 0}%
- {\alphabeticfalse}{\alphabetictrue}%
+ {\global\alphabeticfalse}{\global\alphabetictrue}%
}%
- {\alphabeticfalse}%
+ {\global\alphabeticfalse}}%
\defaultTreatments%
}
@@ -1306,7 +1314,7 @@
\expandafter\def\csname#2\endcsname{\%}\else
\expandafter\ifx\expandafter\##1%
\expandafter\def\csname#2\endcsname{\#}\else
- \if\EncodedBlankSpace#1\expandafter\def\csname#2\endcsname{~}\else
+ \if\EncodedBlankSpace#1\expandafter\def\csname#2\endcsname{\ }\else
\expandafter\edef\csname#2\endcsname{#1}%
\fi
\fi