<..gauss.4ht..>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% gauss.4ht 2014-07-12-22:36 %
% Copyright (C) 2008--2009 Eitan M. Gurari %
<.TeX4ht copyright.>
<.config gauss.>
\Hinput{gauss}
\endinput
-_-_-
<..config gauss..>
\def\:tempc[#1]{\def\g@environment{#1matrix}%
\begin{\g@environment}%
\begin{g@matrix}}
\expandafter\HLet\csname \string\gmatrix\endcsname=\:tempc
\def\:tempc{%
\end{g@matrix}%
\end{\g@environment}%
\let\matrix\@empty
\let\endmatrix\@empty
}
\HLet\endgmatrix=\:tempc
-_-_-
<..config gauss..>+
\catcode‘\#=13 \catcode‘\!=6
\def\reg:g@matrix{%
\hbox\bgroup
\global\g@maxrow@old\g@maxrow
\global\g@maxcol@old\g@maxcol
\global\g@maxrow0%
\global\g@maxcol0%
\let\rowops\g@east
\let\colops\g@north
\vbox\bgroup
\def\\{\mathstrut\cr\global\advance\g@maxrow1\relax}%
\global\let\g@endregion\g@endmatrix
\global\g@tab=2\arraycolsep
<.ialign g@matrix.>}
\catcode‘\#=6 \catcode‘\!=12
-_-_-
<..ialign g@matrix..>
\SaveMkHalignConf:g{g@matrix}%\HRestore\noalign
\MkHalign#{\g@prae#\g@post&&%
\kern\g@tab\g@prae#\g@post}%
-_-_-
<..config gauss..>+
\def\:tempc{%
\g@endregion
\global\g@maxrow\g@maxrow@old
\global\g@maxcol\g@maxcol@old
\global\let\g@endregion\g@endmatrix
\global\let\rowops\g@east
\global\let\colops\g@north
}
\HLet\endg@matrix=\:tempc
\def\:temp{\pic:MkHalign{g@matrix}}
\HLet\g@matrix=\:temp
\NewConfigure{gmatrix}[6]{%
\def\a:g@matrix {#1}%
\def\b:g@matrix {#2}%
\def\c:g@matrix {#3}%
\def\d:g@matrix {#4}%
\def\e:g@matrix {#5}%
\def\f:g@matrix {#6}%
}
\Configure{gmatrix}{}{}{}{}{}{}
-_-_-
<..config gauss..>+
\def\:tempc{%
\crcr\EndMkHalign
\RecallMkHalignConfig \egroup \egroup
\b:g@matrix
\global\let\colops\g@north
}
\HLet\g@endmatrix\:tempc
-_-_-
<..config gauss..>+
\def\:tempc{%
\g@endregion
\def\swap{\g@east@arrow11\rowswapfromlabel\rowswaptolabel}
\def\add{\g@east@arrow01\rowaddfromlabel\rowaddtolabel}
\let\mult\g@east@mult
\gdef\rowops{\PackageError{gauss}%
{Two sets of row operations were specified in %
just one matrix. This is not allowed.}}
\gdef\g@endregion{\b:rowops \egroup}%
\hbox\bgroup \a:rowops
}
\HLet\g@east\:tempc
\def\:tempc#1#2#3#4#5[#6]#7#8{%
\ifnum #1=#2\relax
\hbox{$\a:swap #7\b:swap #8\c:swap$}%
\else
\hbox{$\a:add #7\b:add #8\c:add$}%
\fi
}
\HLet\g@east@arrow@b\:tempc
\def\:tempc#1#2{%
\hbox{$\a:mult #1\b:mult #2\c:mult$}%
}
\HLet\g@east@mult\:tempc
\NewConfigure{rowops}{2}
-_-_-
<..config gauss..>+
\def\:tempc{%
\g@endregion
\gdef\colops{\PackageError{gauss}
{Two sets of column operations are specified in %
just one matrix. This is not allowed.}}%
\gdef\g@endregion{\b:colops \egroup}%
\def\swap{\g@north@arrow11\colswapfromlabel\colswaptolabel}%
\def\add{\g@north@arrow01\coladdfromlabel\coladdtolabel}%
\let\mult\g@north@mult
\hbox\bgroup \a:colops
}
\HLet\g@north\:tempc
\def\:tempc#1#2#3#4#5[#6]#7#8{%
\ifnum #1=#2\relax
\hbox{$\a:swap #7\b:swap #8\c:swap$}%
\else
\hbox{$\a:add #7\b:add #8\c:add$}%
\fi
}
\HLet\g@north@arrow@b\:tempc
\def\:tempc#1#2{%
\hbox{$\a:mult #1\b:mult #2\c:mult$}%
}
\HLet\g@north@mult\:tempc
\NewConfigure{colops}{2}
\NewConfigure{mult}{3}
\NewConfigure{swap}{3}
\NewConfigure{add}{3}
-_-_-