diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/xfor/xfor.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/xfor/xfor.dtx | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/Master/texmf-dist/source/latex/xfor/xfor.dtx b/Master/texmf-dist/source/latex/xfor/xfor.dtx index eda8dbe5802..c49c8f2de61 100644 --- a/Master/texmf-dist/source/latex/xfor/xfor.dtx +++ b/Master/texmf-dist/source/latex/xfor/xfor.dtx @@ -1,12 +1,12 @@ %\iffalse -% xfor.dtx generated using makedtx version 0.93b (c) Nicola Talbot +% xfor.dtx generated using makedtx version 0.94b (c) Nicola Talbot % Command line args: % -src "xfor.sty=>xfor.sty" % -doc "manual.tex" % -author "Nicola Talbot" % -dir "source" % xfor -% Created on 2007/8/16 15:55 +% Created on 2007/8/21 17:28 %\fi %\iffalse %<*package> @@ -56,7 +56,7 @@ %\fi %\MakeShortVerb{"} % -% \title{xfor v1.02: Reimplementation of \cs{@for} to allow +% \title{xfor v1.03: Reimplementation of \cs{@for} to allow %premature termination of the loop} % \author{Nicola L.C. Talbot\\[10pt] %School of Computing Sciences\\ @@ -65,7 +65,7 @@ %NR4 7TJ. United Kingdom.\\ %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % -%\date{16th August 2007} +%\date{21st August 2007} %\maketitle %\tableofcontents % @@ -97,11 +97,11 @@ %On the last iteration, this value %will be \cs{@nil}, and so can be checked using %\begin{verbatim} -%\ifx\@xfor@nextelement\@nnil -%% last iteration -%\else -%% not last iteration -%\fi +% \ifx\@xfor@nextelement\@nnil +% % last iteration +% \else +% % not last iteration +% \fi %\end{verbatim} % %\subsection{Example (ordered insertion)} @@ -124,50 +124,50 @@ %defines the command \cs{insertinto}\marg{new val}\marg{list} %which uses this method: %\begin{verbatim} -%\newcommand{\insertinto}[2]{% -%\def\nlst{}% -%\@for\n:=#2\do{% -%% store new list in \toks@ -%\expandafter\toks@\expandafter{\nlst}% -%% test current value against new value -%\ifnum\n>#1\relax -% \edef\newstuff{\number#1,\n}% -% % end for loop at the end of this iteration -% \@endfortrue -%\else -% \edef\newstuff{\n}% -%\fi -%% append new stuff to new list -%\ifx\nlst\@empty -% \edef\nlst{\newstuff}% -%\else -% \edef\nlst{\the\toks@,\newstuff}% -%\fi -%}% -%% check to see if for loop was prematurely terminated -%\if@endfor -% % loop may have been terminated during final iteration, in -% % which case \@forremainder is empty. -% \ifx\@forremainder\@empty -% % do nothing +% \newcommand{\insertinto}[2]{% +% \def\nlst{}% +% \@for\n:=#2\do{% +% % store new list in \toks@ +% \expandafter\toks@\expandafter{\nlst}% +% % test current value against new value +% \ifnum\n>#1\relax +% \edef\newstuff{\number#1,\n}% +% % end for loop at the end of this iteration +% \@endfortrue % \else -% % loop prematurely ended, append remainder of original list -% % to new list -% \expandafter\toks@\expandafter{\nlst}% -% \edef\nlst{\the\toks@,\@forremainder}% +% \edef\newstuff{\n}% +% \fi +% % append new stuff to new list +% \ifx\nlst\@empty +% \edef\nlst{\newstuff}% +% \else +% \edef\nlst{\the\toks@,\newstuff}% % \fi -%\else -% % wasn't prematurely terminated, so new value hasn't been added -% % add now. -% \expandafter\toks@\expandafter{\nlst}% -% \ifx\nlst\@empty -% \edef\nlst{\number#1}% +% }% +% % check to see if for loop was prematurely terminated +% \if@endfor +% % loop may have been terminated during final iteration, in +% % which case \@forremainder is empty. +% \ifx\@forremainder\@empty +% % do nothing % \else -% \edef\nlst{\the\toks@,\number#1}% +% % loop prematurely ended, append remainder of original list +% % to new list +% \expandafter\toks@\expandafter{\nlst}% +% \edef\nlst{\the\toks@,\@forremainder}% % \fi -%\fi -%\let#2=\nlst -%} +% \else +% % wasn't prematurely terminated, so new value hasn't been added +% % add now. +% \expandafter\toks@\expandafter{\nlst}% +% \ifx\nlst\@empty +% \edef\nlst{\number#1}% +% \else +% \edef\nlst{\the\toks@,\number#1}% +% \fi +% \fi +% \let#2=\nlst +% } %\end{verbatim} %The \cs{insertinto} macro can then be used as follows: %\begin{verbatim} @@ -249,7 +249,7 @@ % Declare package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{xfor}[2007/08/16 v1.02 (NLCT)] +\ProvidesPackage{xfor}[2007/08/21 v1.03 (NLCT)] % \end{macrocode} % Define a switch to determine if the for loop should be % terminated: |