From cdbc5d3bd4d89338a033d47d1368e8e30d273544 Mon Sep 17 00:00:00 2001
From: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
Date: Fri, 4 Jul 2008 10:14:39 +0000
Subject: new forarray package

git-svn-id: svn://tug.org/texlive/trunk@9221 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/forarray/forarray.sty | 838 ++++++++++++++++++++++
 1 file changed, 838 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/forarray/forarray.sty

(limited to 'Master/texmf-dist/tex/latex/forarray/forarray.sty')

diff --git a/Master/texmf-dist/tex/latex/forarray/forarray.sty b/Master/texmf-dist/tex/latex/forarray/forarray.sty
new file mode 100644
index 00000000000..f8fd72c17e8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/forarray/forarray.sty
@@ -0,0 +1,838 @@
+%%
+%% This is file `./forarray.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ./forarray.dtx  (with options: `sty')
+%% 
+%% The file 'forarray.dtx' was generated with the shell script
+%% 'forarray' from the master file 'forarray.dtm'.
+%% 
+%% COPYRIGHT NOTICE:
+%% 
+%% This file is part of the package 'forarray'.
+%% 
+%% The package 'forarray' is (c) 2008 by Christian Schr�ppel. It may be
+%% distributed and/or modified under the conditions of the LaTeX
+%% Project Public License (LPPL), version 1.3c. This licence allows you
+%% to distribute unmodified copies of the package, as long as you
+%% include all components of the package in your distribution. It also
+%% allows modification of the package under certain conditions. Please
+%% read the licence if you intend to modify any of the contents of this
+%% package.
+%% 
+%% If any later version of the LPPL replaces this version, the package
+%% may be distributed and/or modified under the conditions of the
+%% current version of the LPPL at that time. The latest version of the
+%% LPPL is available at http://www.latex-project.org/lppl.txt.
+%% 
+%% The Author of the package is Christian Schr�ppel. You can contact
+%% the author at 'christian@schroeppel.com'.
+%% 
+%% This package has the LPPL maintenance status "maintained". The
+%% Current Maintainer is Christian Schr�ppel.
+%% 
+%% The package 'forarray' consists of the master file 'forarray.dtm',
+%% the file 'README.txt', and the derived files 'forarray.dtx',
+%% 'forarray.sty', 'forarray.pdf', 'forarray-test.tex', and
+%% 'forarray-test.pdf'.
+%% 
+%% The installation script 'forarray' and the documentation style file
+%% 'forarray.dts' are not part of the package 'forarray'. Please note,
+%% however, that the provisions in the section "No warranty" of the
+%% LaTeX Project Public License (LPPL), version 1.3c, exempting the
+%% author and other parties from liability with regard to the work,
+%% apply to the contents of the package as well as to these files.
+%% 
+\ProvidesPackage{forarray}
+	[2008/06/20 Version 1.01 -- Using array structures in LaTeX]
+\makeatletter
+\def\fe@checkifdefined#1{%
+\ifx#1\empty
+\else
+	\expandafter\ifx\csname #1\endcsname\relax
+	\else
+		\PackageError{forarray}
+			{
+			Command #1 is already defined.\MessageBreak
+			This command is being used by the package "forarray" %
+			and must not be defined when the package is loaded
+			}
+			{No further immediate help available.}
+		\csname fi\endcsname\csname fi\endcsname\@gobblefour
+	\fi
+	\expandafter\fe@checkifdefined
+\fi}
+\fe@checkifdefined
+	{CommandForEach}{DefineArrayDefault}{DefineArrayVar}
+	{DefineArrayVars}{DefineArrayVarTo}{endforeach}
+	{ExitForEach}{ExitForEachLevels}{ForArray}{ForEach}
+	{ForEachD}{ForEachSublevel}{ForEachX}{FunctionForEach}
+	{thislevelcount}{thislevelitem}{thislevelmarker}
+	{thislevelnr}{}
+\edef\fe@aux@endlinecharrestore{\the\endlinechar}
+\endlinechar\m@ne
+\newtoks\fe@toks
+\newcount\fe@level
+\newcount\fe@cnt@i
+\newcount\fe@cnt@ii
+\newcount\thislevelcount
+\newcount\thislevelnr
+\fe@level\z@
+\chardef\fa@arraylevel\z@
+\chardef\fe@toplevel\z@
+\chardef\fe@count@abs@\@ne
+\chardef\fe@relmax\z@
+\chardef\fe@relmax@abs@\z@
+\let\fe@item@abs@\empty
+\let\fe@first@abs@\empty
+\let\fe@last@abs@\empty
+\let\fe@empty@abs@\empty
+\let\fe@position@abs@\empty
+\let\fe@levelrn\empty
+\def\ForEachD{\@ifnextchar(\ForEachD@Arg\ForEachD@NoArg}
+\def\ForEachD@Arg(#1){\ForEachD@{#1\relax}}
+\def\ForEachD@NoArg{\ForEachD@\fe@relmax}
+\def\ForEach{\@ifnextchar(\ForEach@Arg\ForEach@NoArg}
+\def\ForEach@Arg(#1){\ForEach@{#1\relax}}
+\def\ForEach@NoArg{\ForEach@\fe@relmax}
+\long\def\ForEach@#1#2#3#4{\ForEachD@{#1}{#2}{#3}#4#2\endforeach}
+\def\ForEachX{\@ifnextchar(\ForEachX@Arg\ForEachX@NoArg}
+\def\ForEachX@Arg(#1){\ForEachX@{#1\relax}}
+\def\ForEachX@NoArg{\ForEachX@\fe@relmax}
+\long\def\ForEachX@#1#2#3#4
+	{
+	\def\fe@i{\ForEachD@{#1}{#2}{#3}}
+	\expandafter\fe@i#4#2\endforeach
+	}
+\def\ForEachSublevel
+	{\@ifnextchar(\ForEachSublevel@Arg\ForEachSublevel@NoArg}
+\def\ForEachSublevel@Arg(#1){\ForEachSublevel@{#1\relax}}
+\def\ForEachSublevel@NoArg{\ForEachSublevel@\fe@relmax}
+\long\def\ForEachSublevel@#1#2#3
+	{
+	\def\fe@i{\ForEachD@{#1}{#2}{#3}}
+	\expandafter\fe@i\thislevelitem#2\endforeach
+	}
+\def\ExitForEach
+	{
+	\expandafter\let
+	\csname fe@next@\romannumeral\fe@level\endcsname
+	\fe@ExitForEach@base
+	}
+\def\fe@ExitForEach@base#1\endforeach{}
+
+\long\def\ForEachD@#1#2#3
+	{
+	\let\fe@upperlevelrn\fe@levelrn
+	\advance\fe@level\@ne\relax
+	\expandafter\def\expandafter\fe@levelrn\expandafter
+		{\romannumeral\fe@level}
+	\ifnum\fe@level>\fe@toplevel
+		\expandafter
+		\ifx\csname fe@count@abs@\fe@levelrn\endcsname\relax
+			\expandafter\newcount
+				\csname fe@count@abs@\fe@levelrn\endcsname
+		\fi
+		\fe@define@position
+	\fi
+	\csname fe@count@abs@\fe@levelrn\endcsname\z@
+	\expandafter\chardef
+		\csname fe@first@abs@\fe@levelrn\endcsname\@ne
+	\expandafter\chardef
+		\csname fe@last@abs@\fe@levelrn\endcsname\z@
+	\expandafter\chardef
+		\csname fe@relmax@abs@\fe@levelrn\endcsname#1\relax
+	\expandafter\fe@define
+		\csname fe@relmax@abs@\fe@levelrn\endcsname\fe@levelvars
+	\expandafter\long\expandafter\def
+		\csname fe@function@\fe@levelrn\endcsname##1{#3}
+	\def\fe@emptytest{#2}
+	\ifx\fe@emptytest\empty
+		\fe@definelevel\empty{}
+	\else
+		\fe@definelevel#2{\expandafter#2}
+	\fi
+	\expandafter\expandafter\expandafter\fe@fnsl@
+		\expandafter\expandafter
+		\csname fe@nextcommandcode@\fe@levelrn\endcsname
+		\csname fe@check@\fe@levelrn\endcsname
+	}
+\def\fe@levelvars{count,item,first,last,position}
+\def\fe@definelevel#1#2
+	{
+	\ifnum\fe@level>\fe@toplevel
+		\fe@newlevel#1
+		\chardef\fe@toplevel\fe@level
+	\fi
+	\expandafter\let\csname fe@separator@\fe@levelrn\endcsname#1
+	\expandafter\expandafter\expandafter\long
+		\expandafter\expandafter\expandafter\def
+		\expandafter\expandafter
+		\csname fe@getitem@\fe@levelrn\endcsname
+		\expandafter##\expandafter1#2\expandafter
+		{\csname fe@setitem@\fe@levelrn\endcsname{##1}}
+	}
+\def\fe@newlevel#1
+	{
+	\fe@DefLevelVar{fe}{\fe@levelrn}
+		{
+		process,next,item@abs,count@abs,first@abs,
+		last@abs,position@abs,function,check,getitem,
+		nextcommandcode,aftergroup,
+		aftergroup@,firsttoken,space,separator,setitem
+		}
+	\fe@CollectLevelVar{base}
+		{check,getitem,next,nextcommandcode}
+	\fe@CollectLevelVar{i}
+		{firsttoken,aftergroup,aftergroup@,space,separator}
+	\fe@CollectLevelVar{ii}
+		{count@abs,first@abs}
+	\fe@CollectLevelVar{iii}
+		{process,function,item@abs,last@abs,setitem}
+	\expandafter\expandafter\expandafter\fe@newlevel@i
+		\expandafter\fe@level@base\fe@level@i
+	\expandafter\fe@newlevel@ii\fe@level@ii
+	\expandafter\expandafter\expandafter\fe@newlevel@iii
+		\expandafter\fe@level@base\fe@level@iii
+	}
+\long\def\fe@newlevel@i#1#2#3#4#5#6#7#8#9
+	{
+	\def#6{\fe@fnsl#4#8#7}
+	\def#7{
+		\ifx#9#4
+			\ifnum#8=\z@
+				\fe@braces@ii#2#5{}
+			\else
+				\fe@braces@ii#2#5{ }
+			\fi
+		\else
+			\ifnum#8=\z@
+				\fe@braces@i#2#5{}
+			\else
+				\fe@braces@i#2#5{ }
+			\fi
+		\fi
+		\fe@item@check@next
+		}
+	\def\fe@i##1
+		{
+		\fe@def@check
+			{
+			\long\def#5{##1}
+				\ifcat\noexpand#4\bgroup
+					\ifx#9\empty
+						\expandafter\def\expandafter#3\expandafter
+							{
+							\expandafter#2\expandafter
+								{\expandafter{#5}}
+							}
+					\else
+						\let#3#6
+					\fi
+				\else
+					\expandafter\def\expandafter#3
+						\expandafter{\expandafter#2#5}
+				\fi
+			}
+			{#1##1}#2#3#4
+		}
+	}
+\long\def\fe@braces@i#1#2#3
+	{
+	\expandafter\def\expandafter\fe@item@check@next\expandafter
+		{\expandafter#1\expandafter{#2}#3}
+	}
+\long\def\fe@braces@ii#1#2#3
+	{
+	\expandafter\def\expandafter\fe@item@check@next\expandafter
+		{\expandafter#1\expandafter{\expandafter{#2}}#3}
+	}
+\long\def\fe@newlevel@ii#1#2{\fe@i{##1}#1#2}
+\long\def\fe@newlevel@iii#1#2#3#4#5#6#7#8#9
+	{
+	\fe@def@setitem#9#7#5
+	\fe@def@process#5#3#1#6#4#7#8
+	}
+\long\def\fe@def@check#1#2#3#4#5#6#7
+	{
+	\long\def#2
+		{
+		\ifx#5\endforeach
+			\let#4\fe@endlevel
+		\else
+			\advance#6\@ne
+			\thislevelcount#6
+			\ifnum#6=\tw@
+				\chardef#7\z@
+			\fi
+			#1
+		\fi
+		#4
+		}
+	}
+\long\def\fe@def@setitem#1#2#3
+	{
+	\long\def#1##1
+		{
+		\long\def#2{##1}
+		\let\thislevelitem#2
+		#3
+		}
+	}
+\long\def\fe@def@process#1#2#3#4#5#6#7
+	{
+	\long\def#1
+		{
+		\ifx#5\endforeach
+			\chardef#7\@ne
+		\fi
+		\def#2{\fe@fnsl@#5#3}
+		#4#6
+		#2
+		}
+	}
+\def\fe@endlevel
+	{
+	\chardef\fe@count@total\thislevelcount
+	\advance\fe@level\m@ne
+	\expandafter\def\expandafter\fe@levelrn\expandafter
+		{\romannumeral\fe@level}
+	\expandafter\fe@define
+		\csname fe@relmax@abs@\fe@levelrn\endcsname\fe@levelvars
+	\expandafter\thislevelcount
+		\csname fe@count@abs@\fe@levelrn\endcsname
+	\expandafter\let\expandafter\thislevelitem
+		\csname fe@item@abs@\fe@levelrn\endcsname
+	}
+\begingroup\def\\{\global\let\fe@fnsl@stoken= }\\ \endgroup
+\def\fe@fnsl#1#2#3
+	{
+	\def\fe@fnsl@cs{#1}
+	\def\fe@fnsl@space{#2}
+	\def\fe@fnsl@next@ii{#3}
+	\expandafter\chardef\fe@fnsl@space\z@
+	\fe@fnsl@stepone
+	}
+\def\fe@fnsl@stepone
+	{\expandafter\futurelet\fe@fnsl@cs\fe@fnsl@steptwo}
+\def\fe@fnsl@steptwo
+	{
+	\expandafter\ifx\fe@fnsl@cs\fe@fnsl@stoken
+		\let\fe@fnsl@next@i=\fe@fnsl@stepthree
+	\else
+		\let\fe@fnsl@next@i\fe@fnsl@next@ii
+	\fi
+	\fe@fnsl@next@i
+	}
+\def\fe@fnsl@stepthree
+	{
+	\expandafter\chardef\fe@fnsl@space\@ne
+	\afterassignment\fe@fnsl@stepone\let\fe@fnsl@next@i= %
+	}
+\def\fe@fnsl@#1#2
+	{
+	\def\fe@fnsl@cs{#1}
+	\def\fe@fnsl@next@ii{#2}
+	\fe@fnsl@stepone@
+	}
+\def\fe@fnsl@stepone@
+	{\expandafter\futurelet\fe@fnsl@cs\fe@fnsl@steptwo@}
+\def\fe@fnsl@steptwo@
+	{
+	\expandafter\ifx\fe@fnsl@cs\fe@fnsl@stoken
+		\let\fe@fnsl@next@i=\fe@fnsl@stepthree@
+	\else
+		\let\fe@fnsl@next@i\fe@fnsl@next@ii
+	\fi
+	\fe@fnsl@next@i
+	}
+\def\fe@fnsl@stepthree@
+	{
+	\afterassignment\fe@fnsl@stepone@\let\fe@fnsl@next@i= %
+	}
+\def\endforeach
+	{
+	\PackageError{forarray}
+		{Tried to expand an \string\endforeach token. %
+		Something is wrong.\MessageBreak
+		The level of the current list is: %
+			\the\fe@level\MessageBreak
+		The content of the current item is: %
+			\expandafter\strip@prefix\meaning\thislevelitem
+			\MessageBreak
+		The position of the item is:
+			\the\thislevelcount}
+		{No further immediate help available. Sorry.}
+	}
+\def\fe@@define@process#1,
+	{
+	\def\fe@@define@Item{#1}
+	\ifx\fe@@define@Item\empty
+		\let\fe@@define@process@next\relax
+	\else
+		\def\fe@@define@process@next
+			{
+			\expandafter\expandafter\expandafter\def
+			\expandafter\expandafter
+			\csname
+				\fe@VarMacro @\fe@@define@Item @rel@
+				\romannumeral\fe@cnt@ii
+			\endcsname
+			\expandafter
+				{
+				\csname
+					\fe@VarMacro @\fe@@define@Item @abs@
+					\romannumeral\fe@cnt@i
+				\endcsname
+				}
+			\fe@@define@process
+			}
+	\fi
+	\fe@@define@process@next
+	}
+\def\fe@@define
+	{
+	\ifnum\fe@cnt@i>\m@ne
+		\ifnum\fe@cnt@ii>\fe@define@max
+			\let\fe@@define@next\relax
+		\else
+			\def\fe@@define@next{
+				\expandafter\fe@@define@process\fe@Vars,{},
+				\advance\fe@cnt@ii\@ne
+				\advance\fe@cnt@i\m@ne
+				\fe@@define
+				}
+		\fi
+	\else
+		\let\fe@@define@next\relax
+	\fi
+	\fe@@define@next
+	}
+\def\fe@define#1
+	{
+	\chardef\fe@define@max#1\relax
+	\ifnum\fe@define@max>\z@
+		\expandafter\fe@define@
+	\else
+		\expandafter\@gobble
+	\fi
+	}
+\def\fe@define@#1
+	{
+	\def\fe@VarMacro{fe}
+	\let\fe@Vars#1
+	\fe@cnt@i\fe@level
+	\fe@cnt@ii\@ne
+	\fe@@define
+	}
+\def\fe@ProcessList#1,
+	{
+	\def\fe@ProcessList@check{#1}
+	\ifx\fe@ProcessList@check\empty
+		\let\fe@ProcessList@next\relax
+	\else
+		\def\fe@ProcessList@next
+			{
+			\fe@ProcessList@act{#1}
+			\fe@ProcessList
+			}
+	\fi
+	\fe@ProcessList@next
+	}
+\def\fe@DefLevelVar#1#2#3
+	{
+	\def\fe@ProcessList@act##1
+		{
+		\expandafter\expandafter\expandafter\def
+		\expandafter\expandafter
+		\csname #1@##1@level\endcsname
+		\expandafter
+		{\csname #1@##1@#2\endcsname}
+		}
+	\fe@ProcessList#3,{},
+	}
+\def\fe@define@position
+	{
+	\ifnum\fe@level=\@ne
+		\expandafter\expandafter\expandafter
+			\def\expandafter\expandafter
+			\csname fe@position@abs@\fe@levelrn\endcsname
+			\expandafter
+			{
+			\csname fe@position@abs@\fe@upperlevelrn\endcsname
+			\number\thislevelcount
+			}
+	\else
+		\expandafter\expandafter\expandafter
+			\def\expandafter\expandafter
+			\csname fe@position@abs@\fe@levelrn\endcsname
+			\expandafter
+			{
+			\csname fe@position@abs@\fe@upperlevelrn\endcsname
+			-\number\thislevelcount
+			}
+	\fi
+	}
+\def\fe@AddToTokensX#1#2
+	{
+	\expandafter\expandafter\expandafter#1
+	\expandafter\expandafter\expandafter
+	{\expandafter\the\expandafter#1#2}
+	}
+\def\fe@CollectLevelVar@#1#2#3
+	{
+	\expandafter\def\csname #1@level@#2\endcsname{}
+	\def\fe@ProcessList@act##1{
+		\expandafter\fe@AddToTokensX\expandafter
+		\fe@toks\csname #1@##1@level\endcsname
+		}
+	\fe@toks{}
+	\fe@ProcessList#3,{},
+	\expandafter\expandafter\expandafter\def
+		\expandafter\expandafter
+		\csname #1@level@#2\endcsname\expandafter{\the\fe@toks}
+	}
+\def\fe@CollectLevelVar{\fe@CollectLevelVar@{fe}}
+\def\ForArray
+	{
+	\fe@aux@advancechardef\fa@arraylevel\@ne
+	\expandafter\def\expandafter\fa@arraylevelrn\expandafter
+		{\romannumeral\fa@arraylevel}
+	\@ifnextchar(\fa@FA@WRelMax\fa@FA@WoRelMax
+	}
+\def\fa@FA@WRelMax(#1)
+	{
+	\expandafter\chardef
+		\csname fa@relmax@\fa@arraylevelrn\endcsname#1\relax
+	\ForArray@
+	}
+\def\fa@FA@WoRelMax
+	{
+	\expandafter\chardef
+		\csname fa@relmax@\fa@arraylevelrn\endcsname\fe@relmax
+	\ForArray@
+	}
+\def\ForArray@
+	{\@ifnextchar[\fa@FA@WSepListSep\fa@FA@WoSepListSep}
+\def\fa@FA@WSepListSep[#1]{\fa@FA@SepList#1}
+\def\fa@FA@WoSepListSep{\fa@FA@SepList{}}
+\def\fe@aux@advancechardef#1#2
+	{
+	\count@#1
+	\advance\count@#2
+	\chardef#1\count@
+	}
+\def\fa@FA@SepList#1#2
+	{
+	\fe@DefLevelVar{fa}{\fa@arraylevelrn}
+		{
+		separatorcount,oldcatcode,baselevel,level,olddef,
+		array,restore,next,separator,orientation,nextlevel,
+		oldnextlevel,oldlowernextlevel
+		}
+	\expandafter\chardef
+		\csname fa@level@\fa@arraylevelrn\endcsname\z@
+	\ForEach
+		{#1}
+		{
+			\expandafter\expandafter\expandafter\def
+				\expandafter\expandafter
+				\csname
+					fa@separator@\fa@arraylevelrn @
+					\romannumeral\thislevelcount
+				\endcsname
+				\expandafter
+				{\thislevelitem}
+		}
+		{#2}
+	\expandafter\chardef\fa@separatorcount@level\fe@count@total
+	\fa@FA@MarkerList
+	}
+\def\fa@FA@MarkerList
+	{\@ifnextchar[\fa@FA@WMarkerList\fa@FA@SublevelToken}
+\def\fa@FA@WMarkerList[
+	{\@ifnextchar[\fa@FA@WMarkerListSep\fa@FA@WoMarkerListSep}
+\def\fa@FA@WMarkerListSep[#1]#2]{\fa@FA@MarkerList@{#1}{#2}}
+\def\fa@FA@WoMarkerListSep#1]{\fa@FA@MarkerList@{}{#1}}
+\def\fa@FA@MarkerList@#1#2
+	{
+	\ForEach
+		{#1}
+		{
+			\expandafter\expandafter\expandafter\def
+				\expandafter\expandafter
+				\csname
+					fa@orientation@\fa@arraylevelrn @
+					\romannumeral\thislevelcount
+				\endcsname
+				\expandafter
+				{\thislevelitem}
+		}
+		{#2}
+	\fa@FA@SublevelToken
+	}
+\def\fa@FA@SublevelToken#1
+	{
+	\expandafter\fa@SublevelToken\fa@array@level#1
+	\fa@FA@Process
+	}
+\long\def\fa@FA@Process#1#2#3
+	{
+	\ForEach
+		{#1}
+		{
+			\expandafter\expandafter\expandafter\def
+				\expandafter\expandafter
+				\csname
+					fa@function@\fa@arraylevelrn @
+					\romannumeral\thislevelcount
+				\endcsname
+				\expandafter
+				{\thislevelitem}
+		}
+		{#2}
+	\long\def\thislevelitem{#3}
+	\fe@cnt@i\fe@level
+	\advance\fe@cnt@i\@ne
+	\expandafter\chardef\fa@baselevel@level\fe@cnt@i
+	\expandafter\def\fa@array@level
+		{
+		\ifnum\fa@level@level=\fa@separatorcount@level\relax
+			\expandafter\def\fa@next@level{\thislevelitem}
+		\else
+			\expandafter\let\fa@next@level\fa@next@level@
+
+		\fi
+		\fa@next@level
+		}
+	\fa@array@level
+	\fa@restore@level
+	\fe@aux@advancechardef\fa@arraylevel\m@ne
+	\expandafter\def\expandafter\fa@arraylevelrn\expandafter
+		{\romannumeral\fa@arraylevel}
+	}
+\def\fa@next@level@
+	{
+	\fa@SetLevelVars\tw@
+	\expandafter\expandafter\expandafter\def
+		\expandafter\expandafter\expandafter\fa@i
+		\expandafter\expandafter\expandafter
+		{
+		\csname
+		fa@separator@\fa@arraylevelrn @
+		\romannumeral\fa@level@level
+		\endcsname
+		}
+	\expandafter\expandafter\expandafter\expandafter
+		\expandafter\expandafter\expandafter
+		\ForEachSublevel@
+		\expandafter\expandafter\expandafter\expandafter
+		\expandafter\expandafter
+		\csname
+			fa@relmax@\fa@arraylevelrn
+		\endcsname
+		\expandafter
+		\fa@i
+		\expandafter
+		{
+		\csname
+			fa@function@\fa@arraylevelrn @
+			\romannumeral\fa@level@level
+		\endcsname
+		}
+	\fa@SetLevelVars\@ne
+	}
+\def\fa@SetLevelVars#1
+	{
+	\fe@cnt@i\fe@level
+	\advance\fe@cnt@i-\fa@baselevel@level
+	\advance\fe@cnt@i#1
+	\expandafter\chardef\fa@level@level\fe@cnt@i
+	\thislevelnr\fa@level@level
+	\expandafter\let\expandafter\thislevelmarker
+		\csname
+			fa@orientation@\fa@arraylevelrn @
+			\romannumeral\fa@level@level
+		\endcsname
+	}
+\def\ExitForEachLevels#1#2
+	{
+	\fe@cnt@i\fe@level
+	\fe@cnt@ii\z@
+	\advance\fe@cnt@i\@ne
+	\advance\fe@cnt@i-#1\relax
+	\def\fe@exitforeach
+		{
+		\ifnum\fe@cnt@ii<#2\relax
+			\def\fe@exitforeach@next
+				{
+				\expandafter\let
+					\csname fe@next@\romannumeral\fe@level\endcsname
+					\fe@ExitForEach@base
+				\advance\fe@cnt@i\m@ne
+				\advance\fe@cnt@ii\@ne
+				}
+		\else
+			\let\fe@exitforeach@next\relax
+		\fi
+		\fe@exitforeach@next
+		}
+	\fe@exitforeach
+	}
+\def\fa@SublevelToken#1#2
+	{
+	\expandafter\if\noexpand#2\relax
+		\expandafter\let\fa@olddef@level#2
+		\def#2{#1}
+		\expandafter\def\fa@restore@level
+			{\expandafter\let#2\fa@olddef@level}
+	\else
+		\chardef\fa@oldcatcode@level\catcode`#2\relax
+		\ifnum\fa@oldcatcode@level=\active
+			\expandafter\let\fa@olddef@level#2
+		\else
+			\catcode`#2\active
+		\fi
+		\expandafter\def\fa@restore@level
+			{
+			\ifnum\fa@oldcatcode@level=\active
+				\expandafter\expandafter\expandafter
+				\fa@SublevelToken
+				\expandafter\expandafter\expandafter
+				{\fa@olddef@level}{#2}
+			\else
+				\catcode`#2\fa@oldcatcode@level
+			\fi
+			}
+			\bgroup
+				\uccode`\~`#2\relax
+				\uppercase{
+			\egroup
+					\def~{#1}
+					}
+	\fi
+	}
+\def\DefineArrayVar#1#2#3#4#5#6
+	{
+	\ForEach{#5}
+		{
+		\expandafter\expandafter\expandafter
+			\def\expandafter\expandafter
+			\csname
+				fe@item@nr@\number\thislevelcount
+			\endcsname
+			\expandafter{\thislevelitem}
+		}
+		{#6}
+	\ForEach{#3}
+		{
+		\expandafter\ifx
+			\csname
+				fe@item@nr@\number\thislevelcount
+			\endcsname
+			\relax
+			\fe@DefineArrayVar@Warning{#4}{#5}
+			\ExitForEach
+		\else
+			\expandafter\expandafter\expandafter\def
+			\expandafter\expandafter\expandafter
+			\fa@ArrayVarContent
+			\expandafter\expandafter\expandafter
+				{
+				\csname
+					fe@item@nr@\number\thislevelcount
+				\endcsname
+				}
+			\expandafter\ifx
+				\csname
+					fe@item@nr@\number\thislevelcount
+				\endcsname
+				\empty
+				\typeout
+					{Content of	\expandafter\string
+					\csname #1#2\thislevelitem\endcsname\space
+					is set to nothing.}
+			\else
+				\typeout
+					{Content of	\expandafter\string
+					\csname #1#2\thislevelitem\endcsname\space
+					is set to %
+					\expandafter\strip@prefix
+					\meaning\fa@ArrayVarContent.}
+			\fi
+			\expandafter\expandafter\expandafter\def
+				\expandafter\expandafter
+				\csname #1#2\thislevelitem\endcsname\expandafter
+				{\fa@ArrayVarContent}
+		\fi
+		}
+		{#4}
+	}
+\def\fe@DefineArrayVar@Warning#1#2
+	{
+	\PackageWarning
+		{fornext}
+		{
+		No more items available while %
+			defining pointers!\MessageBreak
+		Pointers: #1\MessageBreak
+		Items:\space\space\space #2
+		}
+	}
+\def\DefineArrayVars#1#2#3#4#5#6#7
+	{
+	\typeout{}\typeout{Defining Array Variables...}
+	\def\fe@DefineArrayVar@##1#3##2#3##3#2
+		{
+		\typeout{-- Initializing new variable array: ##1}
+		\DefineArrayVar
+			{##1}{#5}{#1}{##3}{#4}{##2}
+		}
+	\ForEach
+		{#2}
+		{\expandafter\fe@DefineArrayVar@\thislevelitem#3#6#2}
+		{#7}
+	}
+\def\DefineArrayDefault#1#2#3#4#5
+	{
+	\ForEach
+		{#1}
+		{
+		\expandafter\edef\csname\thislevelitem\endcsname
+			{
+			\noexpand\expandafter\noexpand\ifx
+			\noexpand\csname
+				\thislevelitem #2\noexpand#3
+			\noexpand\endcsname
+			\noexpand\relax
+				\noexpand\csname
+					\thislevelitem #2#4
+				\noexpand\endcsname
+			\noexpand\else
+				\noexpand\csname
+					\thislevelitem #2\noexpand#3
+				\noexpand\endcsname
+			\noexpand\fi
+			}
+		}
+		{#5}
+	}
+\def\DefineArrayVarTo#1#2#3#4#5
+	{
+	\ForEach
+		{#1}
+		{\expandafter\expandafter\expandafter\def\expandafter
+			\csname #3#2\thislevelitem\endcsname{#4}}
+		{#5}
+	}
+\def\CommandForEach#1#2#3
+	{\ForEach#1{\expandafter#2\thislevelitem}{#3}}
+\def\FunctionForEach#1#2#3
+	{\ForEach#1{\expandafter#2\expandafter{\thislevelitem}}{#3}}
+\endlinechar\fe@aux@endlinecharrestore\relax
+\makeatother
+%% 
+%%
+%% End of file `./forarray.sty'.
-- 
cgit v1.2.3

