summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/forloop/forloop.pdfbin81065 -> 82547 bytes
-rw-r--r--Master/texmf-dist/source/latex/forloop/forloop.dtx36
-rw-r--r--Master/texmf-dist/tex/latex/forloop/forloop.sty18
-rw-r--r--Master/texmf-dist/tpm/forloop.tpm10
4 files changed, 31 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/latex/forloop/forloop.pdf b/Master/texmf-dist/doc/latex/forloop/forloop.pdf
index f9b17150e78..fa162777742 100644
--- a/Master/texmf-dist/doc/latex/forloop/forloop.pdf
+++ b/Master/texmf-dist/doc/latex/forloop/forloop.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/forloop/forloop.dtx b/Master/texmf-dist/source/latex/forloop/forloop.dtx
index 35d6843124f..317f63733c3 100644
--- a/Master/texmf-dist/source/latex/forloop/forloop.dtx
+++ b/Master/texmf-dist/source/latex/forloop/forloop.dtx
@@ -2,7 +2,7 @@
%
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{forloop}
-%<package> [2006/09/17 v1.0 For Loops for LaTeX]
+%<package> [2006/09/18 v3.0 For Loops for LaTeX]
%<package>\RequirePackage{ifthen}
%
%
@@ -40,6 +40,8 @@
%% Right brace \} Tilde \~}
%
% \changes{v1.0}{2006/09/17}{Initial Release}
+% \changes{v2.0}{2006/09/18}{Re-wrote forloop command after discovering that whiledo took too many resources}
+% \changes{v3.0}{2006/09/18}{total restructure of forloop command to make nested loops work}
%
% \GetFileInfo{forloop.sty}
%
@@ -85,32 +87,30 @@
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \begin{macro}{\forloop}
-% |\forloop|\oarg{step}|{|\meta{counter}|=|\meta{value}|}|\marg{condition}\marg{code}.
+% |\forloop|\oarg{step}\marg{counter}\marg{initial value}\marg{condition}\marg{code}
%
-% In action: |\forloop{testct=1}{\value{testct} < 3}{\arabic{testct}}|
-% \newcounter{testct} \forloop{testct=1}{\value{testct} < 3}{\arabic{testct}}
-%
+% |\newcounter{ct} \forloop{ct}{1}{\value{ct} < 10}{\arabic{ct} }|
+%
+% \newcounter{ct} \forloop{ct}{1}{\value{ct} < 10}{\arabic{ct} }
% \begin{macrocode}
-\newcommand{\forloop}[4][1]%
+\newcommand{\forloop}[5][1]%
{%
-\forloop@split#2\%%
-\setcounter{\forloop@ct@name}{\forloop@ct@initialvalue}%
-\whiledo{ #3 }%
+\setcounter{#2}{#3}%
+\ifthenelse{#4}%
{%
- #4%
- \addtocounter{\forloop@ct@name}{#1}%
+ #5%
+ \addtocounter{#2}{#1}%
+ \forloop[#1]{#2}{\value{#2}}{#4}{#5}%
}%
-}%
% \end{macrocode}
-% \end{macro}
-%
-%
+% Else
% \begin{macrocode}
-\def\forloop@split#1=#2\%{%
-\gdef\forloop@ct@name{#1}%
-\gdef\forloop@ct@initialvalue{#2}%
+ {%
+ }%
}%
% \end{macrocode}
+% \end{macro}
+%
%
% \begin{macro}{\forLoop}
% |\forLoop|\oarg{step}\marg{start}\marg{stop}\marg{counter name}\marg{code}
diff --git a/Master/texmf-dist/tex/latex/forloop/forloop.sty b/Master/texmf-dist/tex/latex/forloop/forloop.sty
index 724aa3cffe7..fec750838a1 100644
--- a/Master/texmf-dist/tex/latex/forloop/forloop.sty
+++ b/Master/texmf-dist/tex/latex/forloop/forloop.sty
@@ -13,7 +13,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{forloop}
- [2006/09/17 v1.0 For Loops for LaTeX]
+ [2006/09/18 v3.0 For Loops for LaTeX]
\RequirePackage{ifthen}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -30,19 +30,17 @@
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
-\newcommand{\forloop}[4][1]%
+\newcommand{\forloop}[5][1]%
{%
-\forloop@split#2\%%
-\setcounter{\forloop@ct@name}{\forloop@ct@initialvalue}%
-\whiledo{ #3 }%
+\setcounter{#2}{#3}%
+\ifthenelse{#4}%
{%
-#4%
-\addtocounter{\forloop@ct@name}{#1}%
+#5%
+\addtocounter{#2}{#1}%
+\forloop[#1]{#2}{\value{#2}}{#4}{#5}%
}%
+{%
}%
-\def\forloop@split#1=#2\%{%
-\gdef\forloop@ct@name{#1}%
-\gdef\forloop@ct@initialvalue{#2}%
}%
\newcommand{\forLoop}[5][1]
{%
diff --git a/Master/texmf-dist/tpm/forloop.tpm b/Master/texmf-dist/tpm/forloop.tpm
index 6d00465746d..12bb63ca16d 100644
--- a/Master/texmf-dist/tpm/forloop.tpm
+++ b/Master/texmf-dist/tpm/forloop.tpm
@@ -3,23 +3,23 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/forloop.zip">
<TPM:Name>forloop</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/09/17 20:42:00</TPM:Date>
+ <TPM:Date>2006/09/19 03:24:00</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>The forloop package.</TPM:Title>
<TPM:Description></TPM:Description>
<TPM:Author></TPM:Author>
- <TPM:Size>90075</TPM:Size>
+ <TPM:Size>91093</TPM:Size>
<TPM:Build/>
- <TPM:RunFiles size="2853">
+ <TPM:RunFiles size="2770">
texmf-dist/tex/latex/forloop/forloop.sty
texmf-dist/tpm/forloop.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="81926">
+ <TPM:DocFiles size="83408">
texmf-dist/doc/latex/forloop/README
texmf-dist/doc/latex/forloop/forloop.pdf
</TPM:DocFiles>
- <TPM:SourceFiles size="6314">
+ <TPM:SourceFiles size="6387">
texmf-dist/source/latex/forloop/forloop.dtx
texmf-dist/source/latex/forloop/forloop.ins
</TPM:SourceFiles>