summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/coolstr/README66
-rw-r--r--Master/texmf-dist/doc/latex/coolstr/coolstr.pdfbin124324 -> 133354 bytes
-rw-r--r--Master/texmf-dist/source/latex/coolstr/coolstr.dtx210
-rw-r--r--Master/texmf-dist/source/latex/coolstr/coolstr.ins78
-rw-r--r--Master/texmf-dist/tex/latex/coolstr/coolstr.sty96
-rw-r--r--Master/texmf-dist/tpm/coolstr.tpm8
6 files changed, 367 insertions, 91 deletions
diff --git a/Master/texmf-dist/doc/latex/coolstr/README b/Master/texmf-dist/doc/latex/coolstr/README
index 2d6eed8450a..6c52e8a6a0e 100644
--- a/Master/texmf-dist/doc/latex/coolstr/README
+++ b/Master/texmf-dist/doc/latex/coolstr/README
@@ -1,34 +1,34 @@
-Description
------------
-
-The coolstr package is a subpackage of the cool package that deals with the
-manipulation of strings. A string is defined as a sequence of characters
-(not tokens).
-
-The package provides the ability to access a specific character of a string,
-as well as determine if the string contains numeric or integer data.
-
-Installation
-------------
-
-To install this package, run coolstr.ins through LaTeX. This will generate
-a file called coolstr.sty. Put this file somewhere where LaTeX will find
-it---for instance localtexmf/tex/latex/coolstr/ (note that you will need
-to create the folder coolstr).
-
-If you are using MikTeX, you then need to refresh the file name database
-by using MikTeX Options
-
-
-License
--------
-
-This pacakge is released under the GNU Lesser General Public License. See
-http://www.gnu.org/licenses/licenses.html#LGPL for more details.
-
-Contact
--------
-
-Any bugs may be reported to the author by sending an email to the address with
-the first part being nsetzer, then an at sign, the next part is umd, and
+Description
+-----------
+
+The coolstr package is a subpackage of the cool package that deals with the
+manipulation of strings. A string is defined as a sequence of characters
+(not tokens).
+
+The package provides the ability to access a specific character of a string,
+as well as determine if the string contains numeric or integer data.
+
+Installation
+------------
+
+To install this package, run coolstr.ins through LaTeX. This will generate
+a file called coolstr.sty. Put this file somewhere where LaTeX will find
+it---for instance localtexmf/tex/latex/coolstr/ (note that you will need
+to create the folder coolstr).
+
+If you are using MikTeX, you then need to refresh the file name database
+by using MikTeX Options
+
+
+License
+-------
+
+This pacakge is released under the GNU Lesser General Public License. See
+http://www.gnu.org/licenses/licenses.html#LGPL for more details.
+
+Contact
+-------
+
+Any bugs may be reported to the author by sending an email to the address with
+the first part being nsetzer, then an at sign, the next part is umd, and
finally it ends in dot edu. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/coolstr/coolstr.pdf b/Master/texmf-dist/doc/latex/coolstr/coolstr.pdf
index b3ad63bc993..78e5b0286f8 100644
--- a/Master/texmf-dist/doc/latex/coolstr/coolstr.pdf
+++ b/Master/texmf-dist/doc/latex/coolstr/coolstr.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/coolstr/coolstr.dtx b/Master/texmf-dist/source/latex/coolstr/coolstr.dtx
index cb3c9b895a6..1211a996321 100644
--- a/Master/texmf-dist/source/latex/coolstr/coolstr.dtx
+++ b/Master/texmf-dist/source/latex/coolstr/coolstr.dtx
@@ -2,7 +2,7 @@
%
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{coolstr}
-%<package> [2006/12/30 v2.0a COntent Oriented LaTeX Strings]
+%<package> [2007/01/08 v2.1 COntent Oriented LaTeX Strings]
%<package>\RequirePackage{ifthen}
%<package>\RequirePackage{amsmath}
%<package>\RequirePackage{amssymb}
@@ -22,7 +22,7 @@
% \fi
%
%
-% \CheckSum{218}
+% \CheckSum{309}
%
%
%% \CharacterTable
@@ -50,7 +50,7 @@
% \DoNotIndex{\@ne,\expandafter}
% \DoNotIndex{\advance,\begingroup,\catcode,\closein}
% \DoNotIndex{\newcommand,\renewcommand,\providecommand}
-% \DoNotIndex{\closeout,\day,\def,\edef,\gdef,\let,\empty,\endgroup}
+% \DoNotIndex{\closeout,\day,\def,\edef,\gdef,\xdef,\let,\empty,\endgroup}
% \DoNotIndex{\newcounter,\providecounter,\addtocounter,\setcounter,\stepcounter,\value,\arabic}
% \DoNotIndex{\if,\fi,\ifthenelse,\else,\setboolean,\boolean,\newboolean,\provideboolean,\equal,\AND,\OR,\NOT,\whiledo}
% \DoNotIndex{\ifcase,\ifcat,\or,\else}
@@ -97,10 +97,60 @@
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\section{Descriptions}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \DescribeMacro{\substr} |\substr|\marg{string}\marg{start index}\marg{num char} gives at most $\|$\meta{num char}$\|$
+% characters from \meta{string}.
+%
+% if \meta{start index} is greater than zero, and \meta{num char} is greater than zero, |\substr| gives at most
+% \meta{num char} starting with index \meta{start index} and going to the end of the string.
+%
+% if \meta{start index} is greater than zero, and \meta{num char} is less than zero, |\substr| gives at most
+% $-$\meta{num char} characters and going to the beginning of the string
+%
+% if \meta{start index} is less than zero, and \meta{num char} is greater than zero, |\substr| gives at most
+% \meta{num char} characters starting at the $-$\meta{start index} character from the end of the string and going
+% to the end of the string
+%
+% if \meta{start index} is less than zero, and \meta{num char} is less than zero, |\substr| gives at most
+% $-$\meta{num char} characters starting at the $-$\meta{start index} character from the end of the string and going
+% to the beginning of the string
+%
+% There are two special, non-numeric values that \meta{char num} may take. They are |end| or |beg|, and they will always
+% go to the end or begining of the string, respectively
+%
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Test Cases}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
+%\subsection{\texttt{$\backslash$substr}}
+% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \DescribeMacro{\substr}
+%
+% \begin{tabular}{ll}
+% \hline
+% |\substr{12345}{1}{2}| & \substr{12345}{1}{2} \\
+% |\substr{12345}{3}{5}| & \substr{12345}{3}{5} \\
+% |\substr{12345}{3}{end}| & \substr{12345}{3}{end} \\
+% |\substr{12345}{3}{beg}| & \substr{12345}{3}{beg} \\
+% |\substr{12345}{-2}{1}| & \substr{12345}{-2}{1} \\
+% |\substr{12345}{3}{-2}| & \substr{12345}{3}{-2} \\
+% |\substr{12345}{-2}{-2}| & \substr{12345}{-2}{-2} \\
+% |\substr{12345}{0}{5}| & \substr{12345}{0}{5} (the null string) \\
+% |\substr{12345}{2}{0}| & \substr{12345}{2}{0} (the null string) \\
+% \hline
+% \end{tabular}
+%
+%
% \newboolean{t}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -187,7 +237,7 @@
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Thanks to J.~J.~Weimer for the comments and aid in coding.
+% Thanks to J.~J.~Weimer for the comments and aid in coding. Also thanks goes to Abraham Weishaus for pointing out a bug in |\strlenstore|
%
%
%
@@ -278,14 +328,22 @@
%
% \begin{macro}{\strlen}
% \changes{v2.0}{2006/12/29}{added to package}
+% \changes{v2.1}{2007/01/08}{added ifthenelse to return $0$ for empty string}
% |\strlen|\marg{string} gives the length of the string. It is better to use |\strlenstore| to record the length
%
% |\strlen{abc}| \strlen{abc}
%
% \begin{macrocode}
\newcommand{\strlen}[1]{%
-\strchar{#1}{0}
-\arabic{COOL@strpointer}%
+\ifthenelse{\equal{#1}{}}%
+ {%
+ 0%
+ }%
+% Else
+ {%
+ \strchar{#1}{0}%
+ \arabic{COOL@strpointer}%
+ }%
}
% \end{macrocode}
%
@@ -294,12 +352,143 @@
%
% \begin{macro}{\strlenstore}
% \changes{v2.0}{2006/12/29}{added to package}
+% \changes{v2.1}{2007/01/08}{corrected error in setting counter}
+% \changes{v2.1}{2007/01/08}{added ifthenelse to return $0$ for empty string}
% |\strlenstore|\marg{string}\marg{counter} stores the length of \meta{string} in \meta{counter}
%
% \begin{macrocode}
\newcommand{\strlenstore}[2]{%
-\strchar{#1}{0}%
-\setcounter{#2}{COOL@strpointer}%
+\ifthenelse{\equal{#1}{}}%
+ {%
+ \setcounter{#2}{0}%
+ }%
+% Else
+ {%
+ \strchar{#1}{0}%
+ \setcounter{#2}{\value{COOL@strpointer}}%
+ }%
+}
+% \end{macrocode}
+%
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\substr}
+% \changes{v2.1}{2007/01/08}{added to package}
+% |\substr|\marg{string}\marg{index}\marg{numchar}
+%
+% a special value of |end| for \meta{numchar} gives from \meta{index} to the end of the string; |beg| gives from \meta{index} to the beginning of the string
+%
+% \begin{macrocode}
+\newcounter{COOL@str@index}
+\newcounter{COOL@str@start}
+\newcounter{COOL@str@end}
+\newcommand{\substr}[3]{%
+\strlenstore{#1}{COOL@strlen}%
+\ifthenelse{#2 < 0 \AND \NOT #2 < -\value{COOL@strlen}}%
+ {%
+% \end{macrocode}
+% The starting index is less than zero, so start that many characters back from the end. This means mapping the index to \meta{index}${} + {}$\meta{string length}${} + 1$
+% \begin{macrocode}
+ \setcounter{COOL@str@index}{\value{COOL@strlen}}%
+ \addtocounter{COOL@str@index}{#2}%
+ \addtocounter{COOL@str@index}{1}%
+ }%
+% ElseIf
+{\ifthenelse{#2 > 0 \AND \NOT #2 > \value{COOL@strlen}}%
+ {%
+% \end{macrocode}
+% The starting index is greater than zero, and within the appropriate range; record it
+% \begin{macrocode}
+ \setcounter{COOL@str@index}{#2}%
+ }%
+% Else
+ {%
+% \end{macroccode}
+% The \meta{index} value is invalid. Set it to zero for returning the null string
+% \begin{macrocode}
+ \setcounter{COOL@str@index}{0}%
+ }}%
+% \end{macrocode}
+% Now deal with the \meta{numchar} (which can also be negative)
+% \begin{macrocode}
+\ifthenelse{\equal{#3}{beg}}%
+ {%
+ \setcounter{COOL@str@start}{1}%
+ \setcounter{COOL@str@end}{\value{COOL@str@index}}%
+ }%
+% ElseIf
+{\ifthenelse{\equal{#3}{end}}%
+ {%
+ \setcounter{COOL@str@start}{\value{COOL@str@index}}%
+ \setcounter{COOL@str@end}{\value{COOL@strlen}}%
+ }%
+% ElseIf
+{\ifthenelse{#3 < 0}%
+ {%
+% \end{macrocode}
+% This means to take that many characters to the \emph{left} of the starting index.
+% \begin{macrocode}
+ \setcounter{COOL@str@start}{\value{COOL@str@index}}%
+ \addtocounter{COOL@str@start}{#3}%
+ \addtocounter{COOL@str@start}{1}%
+ \ifthenelse{\NOT \value{COOL@str@start} > 0}{\setcounter{COOL@str@start}{1}}{}%
+ \setcounter{COOL@str@end}{\value{COOL@str@index}}%
+ }%
+% ElseIf
+{\ifthenelse{#3 > 0}%
+ {%
+ \setcounter{COOL@str@start}{\value{COOL@str@index}}%
+ \setcounter{COOL@str@end}{\value{COOL@str@index}}%
+ \addtocounter{COOL@str@end}{#3}%
+ \addtocounter{COOL@str@end}{-1}%
+ \ifthenelse{\value{COOL@str@end} > \value{COOL@strlen}}{\setcounter{COOL@str@end}{\value{COOL@strlen}}}{}%
+ }%
+% Else
+ {%
+% \end{macrocode}
+% nonsense submitted, so return the null string
+% \begin{macrocode}
+ \setcounter{COOL@str@index}{0}%
+ }}}}%
+% \end{macrocode}
+% Now send back the appropriate thing
+% \begin{macrocode}
+\ifthenelse{ \value{COOL@str@index} = 0 }%
+ {%
+ }%
+% Else
+ {%
+ \setcounter{COOL@strpointer}{1}%
+ \COOL@substrgobbler#1\COOL@strStop\COOL@strEnd%
+ }%
+}
+% \end{macrocode}
+% Now define the ``gobbler"
+% \begin{macrocode}
+\def\COOL@substrgobbler#1#2\COOL@strEnd{%
+\ifthenelse{\equal{#2}{\COOL@strStop}}%
+ {%
+ \ifthenelse{ \value{COOL@strpointer} < \value{COOL@str@start} \OR \value{COOL@strpointer} > \value{COOL@str@end} }%
+ {}%
+ % Else
+ {%
+ #1%
+ }%
+ }%
+% Else
+ {%
+ \ifthenelse{ \value{COOL@strpointer} < \value{COOL@str@start} \OR \value{COOL@strpointer} > \value{COOL@str@end} }%
+ {}%
+ % Else
+ {%
+ #1%
+ }%
+ \stepcounter{COOL@strpointer}%
+ \COOL@substrgobbler#2\COOL@strEnd%
+ }%
}
% \end{macrocode}
%
@@ -374,11 +563,12 @@
% \noindent |\ifstrleneq{abcde}{3}{length is $3$}{length is not $3$}| \ifstrleneq{abcde}{3}{length is $3$}{length is not $3$}
%
% \changes{v2.0}{2006/12/29}{added to package to do length comparison}
+% \changes{v2.1}{2007/01/08}{altered function to use \texttt{strlenstore}}
%
% \begin{macrocode}
\newcommand{\ifstrleneq}[4]{%
-\strchar{#1}{0}%
-\ifthenelse{ \value{COOL@strpointer} = #2 }%
+\strlenstore{#1}{COOL@strlen}%
+\ifthenelse{ \value{COOL@strlen} = #2 }%
{%
#3%
}%
diff --git a/Master/texmf-dist/source/latex/coolstr/coolstr.ins b/Master/texmf-dist/source/latex/coolstr/coolstr.ins
index 11e7781626e..5ee160edfdd 100644
--- a/Master/texmf-dist/source/latex/coolstr/coolstr.ins
+++ b/Master/texmf-dist/source/latex/coolstr/coolstr.ins
@@ -1,40 +1,40 @@
-%%
-%% Copyright (C) 2005 by nsetzer
-%%
-%% This file may be distributed and/or modified under the
-%% conditions of the Limited General Product License
-%%
-
-\input docstrip.tex
-
-\keepsilent
-
-\usedir{tex/latex/coolstr}
-
-\preamble
-
-This is a generated file
-
-This file may be distributed and/or modified under the
-conditions of the Limited General Product License
-
-\endpreamble
-
-
-\generate{\file{coolstr.sty}{\from{coolstr.dtx}{package}}}
-
-\obeyspaces
-\Msg{****************************************************}
-\Msg{* *}
-\Msg{* To finish the installation you have to move the *}
-\Msg{* following file into a directory searched by TeX: *}
-\Msg{* *}
-\Msg{* coolstr.sty *}
-\Msg{* *}
-\Msg{* To produce the documentation run the file *}
-\Msg{* coolstr.dtx through LaTeX. *}
-\Msg{* *}
-\Msg{* *}
-\Msg{****************************************************}
-
+%%
+%% Copyright (C) 2005 by nsetzer
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the Limited General Product License
+%%
+
+\input docstrip.tex
+
+\keepsilent
+
+\usedir{tex/latex/coolstr}
+
+\preamble
+
+This is a generated file
+
+This file may be distributed and/or modified under the
+conditions of the Limited General Product License
+
+\endpreamble
+
+
+\generate{\file{coolstr.sty}{\from{coolstr.dtx}{package}}}
+
+\obeyspaces
+\Msg{****************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* coolstr.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file *}
+\Msg{* coolstr.dtx through LaTeX. *}
+\Msg{* *}
+\Msg{* *}
+\Msg{****************************************************}
+
\endbatchfile \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/coolstr/coolstr.sty b/Master/texmf-dist/tex/latex/coolstr/coolstr.sty
index 3b23fcc86ef..6035e3567d1 100644
--- a/Master/texmf-dist/tex/latex/coolstr/coolstr.sty
+++ b/Master/texmf-dist/tex/latex/coolstr/coolstr.sty
@@ -13,7 +13,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{coolstr}
- [2006/12/30 v2.0a COntent Oriented LaTeX Strings]
+ [2007/01/08 v2.1 COntent Oriented LaTeX Strings]
\RequirePackage{ifthen}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
@@ -64,12 +64,98 @@
\COOL@strgobble[#2]#1\COOL@strEnd%
}
\newcommand{\strlen}[1]{%
-\strchar{#1}{0}
+\ifthenelse{\equal{#1}{}}%
+{%
+0%
+}%
+{%
+\strchar{#1}{0}%
\arabic{COOL@strpointer}%
+}%
}
\newcommand{\strlenstore}[2]{%
+\ifthenelse{\equal{#1}{}}%
+{%
+\setcounter{#2}{0}%
+}%
+{%
\strchar{#1}{0}%
-\setcounter{#2}{COOL@strpointer}%
+\setcounter{#2}{\value{COOL@strpointer}}%
+}%
+}
+\newcounter{COOL@str@index}
+\newcounter{COOL@str@start}
+\newcounter{COOL@str@end}
+\newcommand{\substr}[3]{%
+\strlenstore{#1}{COOL@strlen}%
+\ifthenelse{#2 < 0 \AND \NOT #2 < -\value{COOL@strlen}}%
+{%
+\setcounter{COOL@str@index}{\value{COOL@strlen}}%
+\addtocounter{COOL@str@index}{#2}%
+\addtocounter{COOL@str@index}{1}%
+}%
+{\ifthenelse{#2 > 0 \AND \NOT #2 > \value{COOL@strlen}}%
+{%
+\setcounter{COOL@str@index}{#2}%
+}%
+{%
+\setcounter{COOL@str@index}{0}%
+}}%
+\ifthenelse{\equal{#3}{beg}}%
+{%
+\setcounter{COOL@str@start}{1}%
+\setcounter{COOL@str@end}{\value{COOL@str@index}}%
+}%
+{\ifthenelse{\equal{#3}{end}}%
+{%
+\setcounter{COOL@str@start}{\value{COOL@str@index}}%
+\setcounter{COOL@str@end}{\value{COOL@strlen}}%
+}%
+{\ifthenelse{#3 < 0}%
+{%
+\setcounter{COOL@str@start}{\value{COOL@str@index}}%
+\addtocounter{COOL@str@start}{#3}%
+\addtocounter{COOL@str@start}{1}%
+\ifthenelse{\NOT \value{COOL@str@start} > 0}{\setcounter{COOL@str@start}{1}}{}%
+\setcounter{COOL@str@end}{\value{COOL@str@index}}%
+}%
+{\ifthenelse{#3 > 0}%
+{%
+\setcounter{COOL@str@start}{\value{COOL@str@index}}%
+\setcounter{COOL@str@end}{\value{COOL@str@index}}%
+\addtocounter{COOL@str@end}{#3}%
+\addtocounter{COOL@str@end}{-1}%
+\ifthenelse{\value{COOL@str@end} > \value{COOL@strlen}}{\setcounter{COOL@str@end}{\value{COOL@strlen}}}{}%
+}%
+{%
+\setcounter{COOL@str@index}{0}%
+}}}}%
+\ifthenelse{ \value{COOL@str@index} = 0 }%
+{%
+}%
+{%
+\setcounter{COOL@strpointer}{1}%
+\COOL@substrgobbler#1\COOL@strStop\COOL@strEnd%
+}%
+}
+\def\COOL@substrgobbler#1#2\COOL@strEnd{%
+\ifthenelse{\equal{#2}{\COOL@strStop}}%
+{%
+\ifthenelse{ \value{COOL@strpointer} < \value{COOL@str@start} \OR \value{COOL@strpointer} > \value{COOL@str@end} }%
+{}%
+{%
+#1%
+}%
+}%
+{%
+\ifthenelse{ \value{COOL@strpointer} < \value{COOL@str@start} \OR \value{COOL@strpointer} > \value{COOL@str@end} }%
+{}%
+{%
+#1%
+}%
+\stepcounter{COOL@strpointer}%
+\COOL@substrgobbler#2\COOL@strEnd%
+}%
}
\newboolean{COOL@charmatch}
\def\COOL@strcomparegobble[#1]<#2>#3#4{%
@@ -106,8 +192,8 @@
}%
}
\newcommand{\ifstrleneq}[4]{%
-\strchar{#1}{0}%
-\ifthenelse{ \value{COOL@strpointer} = #2 }%
+\strlenstore{#1}{COOL@strlen}%
+\ifthenelse{ \value{COOL@strlen} = #2 }%
{%
#3%
}%
diff --git a/Master/texmf-dist/tpm/coolstr.tpm b/Master/texmf-dist/tpm/coolstr.tpm
index 1289a6c628a..de45cb23419 100644
--- a/Master/texmf-dist/tpm/coolstr.tpm
+++ b/Master/texmf-dist/tpm/coolstr.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/coolstr.zip">
<TPM:Name>coolstr</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/12/30 19:34:00</TPM:Date>
+ <TPM:Date>2007/01/11 00:17:00</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>The coolstr package.</TPM:Title>
@@ -12,15 +12,15 @@
<TPM:Size>154488</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="6672">
+ <TPM:RunFiles size="8691">
texmf-dist/tex/latex/coolstr/coolstr.sty
texmf-dist/tpm/coolstr.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="125438">
+ <TPM:DocFiles size="134435">
texmf-dist/doc/latex/coolstr/README
texmf-dist/doc/latex/coolstr/coolstr.pdf
</TPM:DocFiles>
- <TPM:SourceFiles size="22378">
+ <TPM:SourceFiles size="29112">
texmf-dist/source/latex/coolstr/coolstr.dtx
texmf-dist/source/latex/coolstr/coolstr.ins
</TPM:SourceFiles>