Debian Codegraph @

texmf-dist/tex/generic/tex4ht/gauss.4ht

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % gauss.4ht 2009-05-21-09:32 %
3 % Copyright (C) 2008--2009 Eitan M. Gurari %
4 % %
5 % This work may be distributed and/or modified under the %
6 % conditions of the LaTeX Project Public License, either %
7 % version 1.3c of this license or (at your option) any %
8 % later version. The latest version of this license is %
9 % in %
10 % http://www.latex-project.org/lppl.txt %
11 % and version 1.3c or later is part of all distributions %
12 % of LaTeX version 2005/12/01 or later. %
13 % %
14 % This work has the LPPL maintenance status "maintained".%
15 % %
16 % This Current Maintainer of this work %
17 % is Eitan M. Gurari. %
18 % %
19 % If you modify this program your changing its signature %
20 % with a directive of the following form will be %
21 % appreciated. %
22 % \message{signature} %
23 % %
24 % [email protected] %
25 % http://www.cse.ohio-state.edu/~gurari %
26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
27 \immediate\write-1{version 2009-05-21-09:32}
28
29 \def\:tempc[#1]{\def\g@environment{#1matrix}%
30 \begin{\g@environment}%
31 \begin{g@matrix}}
32 \expandafter\HLet\csname \string\gmatrix\endcsname=\:tempc
33 \def\:tempc{%
34 \end{g@matrix}%
35 \end{\g@environment}%
36 \let\matrix\@empty
37 \let\endmatrix\@empty
38 }
39 \HLet\endgmatrix=\:tempc
40 \catcode`\#13 \catcode`\!6
41 \def\reg:g@matrix{%
42 \hbox\bgroup
43 \global\g@maxrow@old\g@maxrow
44 \global\g@maxcol@old\g@maxcol
45 \global\g@maxrow0%
46 \global\g@maxcol0%
47 \let\rowops\g@east
48 \let\colops\g@north
49 \vbox\bgroup
50 \def\\{\mathstrut\cr\global\advance\g@maxrow1\relax}%
51 \global\let\g@endregion\g@endmatrix
52 \global\g@tab=2\arraycolsep
53 \SaveMkHalignConf:g{g@matrix}%
54 \MkHalign#{\g@prae#\g@post&&%
55 \kern\g@tab\g@prae#\g@post}%
56 }
57 \catcode`\#=6 \catcode`\!=12
58 \def\:tempc{%
59 \g@endregion
60 \global\g@maxrow\g@maxrow@old
61 \global\g@maxcol\g@maxcol@old
62 \global\let\g@endregion\g@endmatrix
63 \global\let\rowops\g@east
64 \global\let\colops\g@north
65 }
66 \HLet\endg@matrix\:tempc
67 \def\:temp{\pic:MkHalign{g@matrix}}
68 \HLet\g@matrix\:temp
69 \NewConfigure{gmatrix}[6]{%
70 \def\a:g@matrix {#1}%
71 \def\b:g@matrix {#2}%
72 \def\c:g@matrix {#3}%
73 \def\d:g@matrix {#4}%
74 \def\e:g@matrix {#5}%
75 \def\f:g@matrix {#6}%
76 }
77 \Configure{gmatrix}{}{}{}{}{}{}
78 \def\:tempc{%
79 \crcr\EndMkHalign
80 \RecallMkHalignConfig \egroup \egroup
81 \b:g@matrix
82 \global\let\colops\g@north
83 }
84 \HLet\g@endmatrix\:tempc
85 \def\:tempc{%
86 \g@endregion
87 \def\swap{\g@east@arrow11\rowswapfromlabel\rowswaptolabel}
88 \def\add{\g@east@arrow01\rowaddfromlabel\rowaddtolabel}
89 \let\mult\g@east@mult
90 \gdef\rowops{\PackageError{gauss}%
91 {Two sets of row operations were specified in %
92 just one matrix. This is not allowed.}}
93 \gdef\g@endregion{\b:rowops \egroup}%
94 \hbox\bgroup \a:rowops
95 }
96 \HLet\g@east\:tempc
97 \def\:tempc#1#2#3#4#5[#6]#7#8{%
98 \ifnum #1=#2\relax
99 \hbox{$\a:swap #7\b:swap #8\c:swap$}%
100 \else
101 \hbox{$\a:add #7\b:add #8\c:add$}%
102 \fi
103 }
104 \HLet\g@east@arrow@b\:tempc
105 \def\:tempc#1#2{%
106 \hbox{$\a:mult #1\b:mult #2\c:mult$}%
107 }
108 \HLet\g@east@mult\:tempc
109 \NewConfigure{rowops}{2}
110 \def\:tempc{%
111 \g@endregion
112 \gdef\colops{\PackageError{gauss}
113 {Two sets of column operations are specified in %
114 just one matrix. This is not allowed.}}%
115 \gdef\g@endregion{\b:colops \egroup}%
116 \def\swap{\g@north@arrow11\colswapfromlabel\colswaptolabel}%
117 \def\add{\g@north@arrow01\coladdfromlabel\coladdtolabel}%
118 \let\mult\g@north@mult
119 \hbox\bgroup \a:colops
120 }
121 \HLet\g@north\:tempc
122 \def\:tempc#1#2#3#4#5[#6]#7#8{%
123 \ifnum #1=#2\relax
124 \hbox{$\a:swap #7\b:swap #8\c:swap$}%
125 \else
126 \hbox{$\a:add #7\b:add #8\c:add$}%
127 \fi
128 }
129 \HLet\g@north@arrow@b\:tempc
130 \def\:tempc#1#2{%
131 \hbox{$\a:mult #1\b:mult #2\c:mult$}%
132 }
133 \HLet\g@north@mult\:tempc
134 \NewConfigure{colops}{2}
135 \NewConfigure{mult}{3}
136 \NewConfigure{swap}{3}
137 \NewConfigure{add}{3}
138
139 \Hinput{gauss}
140 \endinput
141