diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:46:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:46:03 +0000 |
commit | 873660d1a83ece926fe7206288dda9c36b349c1b (patch) | |
tree | a48f77125c309a355b5d0eb58d6b24446abe9d62 /Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht | |
parent | 2939242967231097459df0fc3150fabc2f639111 (diff) |
generic 1
git-svn-id: svn://tug.org/texlive/trunk@613 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht')
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht | 529 |
1 files changed, 529 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht b/Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht new file mode 100644 index 00000000000..fba445b9c7f --- /dev/null +++ b/Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht @@ -0,0 +1,529 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% amsmath.4ht 2005-10-23-04:19 % +% Copyright (C) 1997--2005 Eitan M. Gurari % +% % +% This work may be distributed and/or modified under the % +% conditions of the LaTeX Project Public License, either % +% version 1.3 of this license or (at your option) any % +% later version. The latest version of this license is % +% in % +% http://www.latex-project.org/lppl.txt % +% and version 1.3 or later is part of all distributions % +% of LaTeX version 2003/12/01 or later. % +% % +% This work has the LPPL maintenance status "maintained".% +% % +% This Current Maintainer of this work % +% is Eitan M. Gurari. % +% % +% If you modify this program your changing its signature % +% with a directive of the following form will be % +% appreciated. % +% \message{signature} % +% % +% gurari@cse.ohio-state.edu % +% http://www.cse.ohio-state.edu/~gurari % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\immediate\write-1{version 2005-10-23-04:19} + +\HRestore\cases +\HRestore\matrix +\HRestore\pmatrix +\append:def\a:display{\@displaytrue} +\expandafter\append:defIII\csname + c:$$:\endcsname{\append:def\a:display{\@displaytrue}} + + + +\expandafter\ifx \csname tmp:muskip\endcsname\relax + \csname newmuskip\endcsname \tmp:muskip +\fi +\expandafter\def\csname :tempc\endcsname#1#2#3{% + \ifmmode + \bgroup + \tmp:muskip #1#2\edef\mathglue{\the\tmp:muskip}% + \tmp:dim #1#3\edef\textspace{\the\tmp:dim}\a:tmspace + \egroup + \else \kern #1#3\fi \relax +} +\HLet\tmspace=\:tempc +\NewConfigure{tmspace}{1} +\Configure{tmspace}{\mskip\mathglue} +\HRestore\over +\def\:tempc{\pic:gobble\a:over \o:@@over: \pic:gobble\b:over} +\HLet\@@over\:tempc +\HRestore\atop +\def\:tempc{\pic:gobble\a:atop \o:@@atop: \pic:gobble\b:atop} +\HLet\@@atop\:tempc +\def\::above{\pic:gobble\a:above \o:@@above:\tmp:dim + \pic:gobble\b:above } +\def\:above{\afterassignment\::above} +\def\:tempc{\Protect\:above \tmp:dim=} +\HLet\@@above\:tempc +\HRestore\abovewithdelims +\def\::abovewithdelims#1#2{\pic:gobble\a:abovewithdelims + \o:@@abovewithdelims:#1#2\tmp:dim\pic:gobble\b:abovewithdelims} +\def\:abovewithdelims#1#2{\def\:temp{\::abovewithdelims#1#2}% + \afterassignment\:temp\tmp:dim} +\def\:tempc{\Protect\:abovewithdelims } +\HLet\@@abovewithdelims\:tempc +\NewConfigure{abovewithdelims}{2} +\HRestore\overwithdelims +\def\:overwithdelims#1#2{\pic:gobble\a:overwithdelims + \o:@@overwithdelims:#1#2\pic:gobble\b:overwithdelims} +\def\:tempc{\Protect\:overwithdelims} +\HLet\@@overwithdelims\:tempc +\NewConfigure{overwithdelims}{2} +\HRestore\atopwithdelims +\def\:atopwithdelims#1#2{\pic:gobble\a:atopwithdelims + \o:@@atopwithdelims:#1#2\pic:gobble\b:atopwithdelims} +\def\:tempc{\Protect\:atopwithdelims} +\HLet\@@atopwithdelims\:tempc +\NewConfigure{atopwithdelims}{2} +\let\ltx@label\lb:l +\let\Mathaccent:\mathaccent@ +\def\mathaccent@#1#2{\ifx \EndPicture\:UnDef + \DN@{\Picture+{}\Mathaccent:{#1}{#2}\EndPicture}% + \else\DN@{\Mathaccent:{#1}{#2}}\fi\next@} +\def\:tempc#1#2#3{\a:underarrow@ + \hbox{$\m@th#2#3$}\b:underarrow@ + \hbox{#1#2}\c:underarrow@ +} +\HLet\underarrow@\:tempc +\def\:tempc#1#2#3{\a:overarrow@ + \hbox{#1#2}\b:overarrow@ + \hbox{$\m@th#2#3$}\c:overarrow@ +} +\HLet\overarrow@\:tempc +\NewConfigure{underarrow@}{3} +\NewConfigure{overarrow@}{3} +\def\:temp#1#2{\a:overset\binrel@{#2}% + \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}\b:overset} +\HLet\overset\:temp +\NewConfigure{overset}{2} +\def\:temp#1#2{\a:underset\binrel@{#2}% + \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}\b:underset} +\HLet\underset\:temp +\NewConfigure{underset}{2} + +\MathSymbol\mathop{dotsc} +\MathSymbol\mathop{dotso} +\MathSymbol\mathrel{longleftarrow} +\MathSymbol\mathrel{longrightarrow} + +\def\:temp#1{{\a:boxed\leavevmode + \vbox{\m@th$\displaystyle#1$}\b:boxed}} +\HLet\boxed\:temp +\NewConfigure{boxed}{2} +\def\:temp#1#2{\a:xrightarrow \o:xrightarrow:{#1}\b:xrightarrow} +\HLet\xrightarrow\:temp +\NewConfigure{xrightarrow}{2} +\def\:temp#1#2{\a:xleftarrow \o:xleftarrow:{#1}\b:xleftarrow} +\HLet\xleftarrow\:temp +\NewConfigure{xleftarrow}{2} + +\def\equation{\bgroup \@fleqnfalse +% + \ifx \EndPicture\:Undef + \def\endequation{% + \let\tagform@=\:gobble + \if@eqnsw \expand:after{% + % + \o:endequation:\b:equation\equ:no}% + \else \expand:after{% + \ifx\df@tag\@empty \expand:after{\o:endequation:\egroup}% + \else + \global\let\df:tag=\df@tag + \expand:after{\o:endequation: \expandafter\b:equation\df:tag + }\fi + }\fi + \c:equation\egroup + }% + \expandafter\a:equation + \else + \def\endequation{\o:endequation:\egroup}% + \fi + \o:equation:} +\expandafter\def\csname genfrac \endcsname#1#2#3#4{% + \def\@tempa{#1#2}% + \edef\@tempb{\@nx\@genfrac\@mathstyle{#4}% + \expandafter\noexpand\csname @@\ifx @#3@over\else above\fi + \ifx\@tempa\@empty \else withdelims\fi\endcsname}% + \@tempb{#1#2#3}} +\def\:tempc#1#2#3#4#5{{\a:genfrac#1\b:genfrac{\c:genfrac#4#2#3\relax + {\d:genfrac#5\e:genfrac}}\f:genfrac}} +\HLet\@genfrac\:tempc +\NewConfigure{genfrac}{6} +\HRestore\frac +\def\:temp#1#2{{\a:frac\begingroup + #1\endgroup\b:frac \@@over \c:frac #2\d:frac}} +\expandafter\HLet\csname frac \endcsname\:temp +\def\math@cr@@[#1]{\ifnum0=`{\fi \iffalse}\fi\math@cr@@@ + \o:noalign:{\vskip#1\relax}} + \catcode`\#13 \catcode`\!6 +\def\reg:align!1!2{% + \ifx \ifinany@\:Undef\else \inany@true\fi + \inalign@true \ifx \displaybreak@\:UnDef + \chardef\dspbrk@context\z@ +\else + \displaybreak@ +\fi +\intertext@ + \ifingather@\else\displ@y@\fi\Let@ \let\math@cr@@@\math@cr@@@align + \ifxxat@\else \let\tag\tag@in@align \fi + \let\label\label@in@display !1% set st@r + \ifst@rred\else \global\@eqnswtrue \fi \measure@{!2}% + \global\row@\z@ \tabskip\eqnshift@ + \Configure{PauseMkHalign} + {\Configure{PauseMkHalign}{}{}{}{}\expandafter\clean:span}{}{}{}% +% + \SaveMkHalignConf:g{\align:type}\HRestore\noalign +\MkHalign#{\span + &\@lign$\m@th\displaystyle{{\HCode{}}% +#}$% + &\@lign$\m@th\displaystyle{{\HCode{}}% +#}$% +}!2% +} + \catcode`\#=6 \catcode`\!=12 +\def\clean:span#1\c:halign{\TeXhalign \bgroup \:span} +\ifx \ifinany@\:Undef + \def\:tempc{% + \math@cr + \EndMkHalign \RecallMkHalignConfig \csname b:\align:type\endcsname + \ifingather@ \restorealignstate@ \egroup \nonumber + \ifnum0=`{\fi\iffalse}\fi% + \else $$\fi + \global\@ignoretrue +} + +\else + \def\:tempc{% + \math@cr + \EndMkHalign \RecallMkHalignConfig \csname b:\align:type\endcsname + \ifingather@ \restorealignstate@ \egroup \nonumber + \ifnum0=`{\fi}% + \else $$\fi + \global\@ignoretrue +} + +\fi +\HLet\endalign\:tempc +\def\:tempc{\pic:MkHalign{\align:type}} +\HLet\align@\:tempc +\def\Config:alg#1#2#3#4#5#6#7{% + \expandafter\c:def\csname a:#7\endcsname{\global + \let\sv:amps\add:amps #1}% + \expandafter\c:def\csname b:#7\endcsname{#2\global + \let\add:amps\sv:amps}% + \expandafter\c:def\csname c:#7\endcsname{#3}% + \expandafter\c:def\csname d:#7\endcsname{#4}% + \expandafter\c:def\csname e:#7\endcsname{\expandafter\align:td + \expandafter{\csname f:#7\endcsname}{#5}{#6}}% +} +\def\align:td#1#2#3{\iftag@ + \ifnum \add:amps>0 + \gHAdvance\add:amps -1 \gHAdvance\HCol -1 + \global\let#1\empty + \ifnum \add:amps=0 \gHAdvance\HCol1 #2\gdef#1{#3}\fi + \else #2\gdef#1{#3}\fi + \else \gHAssign\add:amps\HCol\relax #2\gdef#1{#3}\fi}% + +\def\:tempc#1{% + \expandafter\pend:def\csname #1\endcsname{\def\align:type{#1}}% + \NewConfigure{#1}[6]{\Config:alg{##1}{##2}{##3}{##4}{##5}{##6}{#1}}% + \Configure{#1}{}{}{}{}{}{}% + \def\:temp{#1}\def\:tempa{align}\ifx \:temp\:tempa\else + \@xp\let\csname reg:#1\endcsname\reg:align + \@xp\let\csname end#1\endcsname\endalign + \fi } +\:tempc{alignat} +\:tempc{alignat*} +\:tempc{xalignat} +\:tempc{xalignat*} +\:tempc{xxalignat} +\:tempc{align} +\:tempc{align*} +\:tempc{flalign} +\:tempc{flalign*} +\pend:defIII\start@align{\Configure{$$}{}{}{}} + \catcode`\#13 \catcode`\!6 +\def\reg:multline!1{% + \ifx \ifinany@\:Undef\else \inany@true\fi + \Let@ + \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}% + \ifx \displaybreak@\:UnDef + \chardef\dspbrk@context\z@ +\else + \displaybreak@ +\fi + \restore@math@cr \let\tag\tag@in@align + \global\tag@false \global\let\raise@tag\@empty + \let\tag\gobble@tag \ifst@rred \let\label\@gobble \else + \stepcounter{equation}% + \def\label{\let\cnt:currentlabel\@currentlabel + \def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel + \the\c@equation\else \@currentlabel\fi}% + \anc:lbl r{equation}\ltx@label}% + \edef\@currentlabel{\the\c@equation}% +\fi +% + \ifst@rred + \expandafter\let\csname e:multline*\endcsname\empty + \expandafter\let\csname f:multline*\endcsname\empty +\fi +\SaveMkHalignConf:g{multline\ifst@rred *\fi}\HRestore\noalign +\MkHalign#{\hbox{$\m@th\displaystyle{\HCode{}}% +#$}}!1% +} + \catcode`\#=6 \catcode`\!=12 +\def\:tempc{\ifst@rred\else + \e:multline(\theequation)\f:multline +\fi +\math@cr \EndMkHalign + \RecallMkHalignConfig \csname b:multline\ifst@rred *\fi\endcsname + $$\global\@ignoretrue } +\HLet\endmultline\:tempc +\def\:tempc{\pic:MkHalign{multline\ifst@rred *\fi}} +\HLet\multline@\:tempc +\NewConfigure{multline}{6} +\@xp\let\csname reg:multline*\endcsname\reg:multline +\@xp\let\csname endmultline*\endcsname\endmultline +\NewConfigure{multline*}{4} + \catcode`\#13 \catcode`\!6 +\def\reg:gather!1{% + \ingather@true \ifx \ifinany@\:Undef + \let\split\insplit@ \chardef\dspbrk@context\z@ +\else + \inany@true +\fi +% + \let\tag\tag@in@align \let\label\label@in@display + \intertext@ \displ@y@ + \Let@ \let\math@cr@@@\math@cr@@@gather + \global\shifttag@false \global\row@\@ne + \SaveMkHalignConf:g{gather\ifst@rred *\fi}\HRestore\noalign +\MkHalign#{\hbox{$\m@th\displaystyle{{\HCode{}}% +#}$}% +&\hbox{{\HCode{}}% +#}% +}!1% +} + \catcode`\#=6 \catcode`\!=12 +\def\:tempc{\math@cr \EndMkHalign + \RecallMkHalignConfig \csname b:gather\ifst@rred *\fi\endcsname + $$\global\@ignoretrue } +\HLet\endgather\:tempc +\def\:tempc{\pic:MkHalign{gather\ifst@rred *\fi}} +\HLet\gather@\:tempc +\NewConfigure{gather}{6} +\@xp\let\csname reg:gather*\endcsname\reg:gather +\@xp\let\csname endgather*\endcsname\endgather +\NewConfigure{gather*}{6} +\def\:tempc{% + \def\intertext##1{% + \ifvmode\else\\\@empty\fi + \noalign{% + \penalty\postdisplaypenalty\vskip\belowdisplayskip + \vbox{\normalbaselines + \ifdim\linewidth=\columnwidth + \else \parshape\@ne \@totalleftmargin \linewidth + \fi + \a:intertext \noindent##1\b:intertext\par}% + \penalty\predisplaypenalty\vskip\abovedisplayskip% + }% +}} +\HLet\intertext@=\:tempc +\NewConfigure{intertext}{2} +\HLet\leftroot\:gobble +\HLet\uproot\:gobble + \catcode`\#13 \catcode`\!6 +\def\reg:smallmatrix{% + \vcenter\bgroup \Let@\restore@math@cr\default@tag + \SaveMkHalignConf:g{smallmatrix}% +\MkHalign#{$\m@th\scriptstyle#$&&% + $\m@th\scriptstyle#$}% +} + \catcode`\#=6 \catcode`\!=12 +\def\:tempc{\crcr\EndMkHalign + \RecallMkHalignConfig \egroup\b:smallmatrix} +\HLet\endsmallmatrix\:tempc +\def\:temp{\pic:MkHalign{smallmatrix}} +\HLet\smallmatrix\:temp +\NewConfigure{smallmatrix}{6} +\pend:defI\substack{\a:substack} +\append:defI\substack{\b:substack} +\NewConfigure{substack}{2} + \catcode`\#13 \catcode`\!6 +\def\reg:subarray!1{% + \vcenter\bgroup + \Let@ \restore@math@cr \default@tag + \baselineskip\fontdimen10 \scriptfont\tw@ + \advance\baselineskip\fontdimen12 \scriptfont\tw@ + \lineskip\thr@@\fontdimen8 \scriptfont\thr@@ + \let\e:subarray\empty \let\f:subarray\empty +\everycr{}\SaveMkHalignConf:g{subarray}% +\MkHalign#{$\m@th\scriptstyle#$}% +} + \catcode`\#=6 \catcode`\!=12 +\def\:tempc{\crcr\EndMkHalign + \RecallMkHalignConfig \egroup\b:subarray} +\HLet\endsubarray\:tempc +\def\:temp#1{\def\Hlcr{#1}\pic:MkHalign{subarray}{#1}} +\HLet\subarray\:temp +\NewConfigure{subarray}{4} +\NewConfigure{split}{6} + \catcode`\#13 \catcode`\!6 +\def\:tempc{% + \vbox\bgroup + \ifx \ifinany@\:Undef + \chardef\dspbrk@context\@ne +\fi +% + \Let@ \restore@math@cr \default@tag \everycr{}\a:split + \SaveMkHalignConf:g{split}\HRestore\noalign + \MkHalign#{ $\m@th\displaystyle{{\HCode{}}% +#}$% +&$\m@th\displaystyle{{\HCode{}}% +#}$% +}} +\HLet\insplit@\:tempc + \catcode`\#6 \catcode`\!12 +\def\:tempc{% + \crcr\EndMkHalign \b:split \egroup } +\HLet\endsplit\:tempc +\Configure{@begin} + {split} + {\relax + \ifx \split\insplit@ \else + \def\choose:begin{\global\let\choose:begin\@firstoftwo + \@secondoftwo}% + \fi + } +\NewConfigure{equations}[2]{\def\pic:equa{#1}\def\pic:equb{#2}} +\def\str:pic{\ifx \EndPicture\:UnDef + \expandafter\Picture\pic:equa{ \pic:equb}% + \else \let\EndPicture\empty \fi + \let\halign\TeXhalign} +\def\make@df@tag@@#1{% + \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}% + \let\cnt:currentlabel\@currentlabel +\def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel + \expandafter\the\csname c@equation\endcsname\else \@currentlabel\fi}% +% + \anc:lbl r{}% +}} +\def\make@df@tag@@@#1{\gdef\df@tag{\tagform@{#1}% + \toks@\@xp{\p@equation{#1}}\edef\@currentlabel{\the\toks@}% + \let\cnt:currentlabel\@currentlabel +\def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel + \expandafter\the\csname c@equation\endcsname\else \@currentlabel\fi}% +% + \anc:lbl r{}% + }} + +\:CheckOption{new-accents} \if:Option \else + \HLet\Hat\hat +\HLet\Check\check +\HLet\Tilde\tilde +\HLet\Acute\acute +\HLet\Grave\grave +\HLet\Dot\dot +\HLet\Ddot\ddot +\HLet\Breve\breve +\HLet\Bar\bar +\HLet\Vec\vec + +\fi +\let\:tempc\measure@ +\pend:defI\:tempc{\bgroup + \RecallTeXcr \HRestore\noalign \let\EndPicture\empty + \let\halign\TeXhalign \let\span\:span \HRestore\begin + \HRestore\end \a:measure@ } +\append:defI\:tempc{\egroup} +\HLet\measure@\:tempc +\NewConfigure{measure@}{1} +\HLet\savealignstate@\empty +\renewcommand{\n:smash:}[2][tb]{% + \def\smash@{#1}% + \ifmmode\@xp\o:mathpalette:\@xp\mathsm@sh\else + \@xp\makesm@sh\fi{#2}} +\let\:tempc\maketag@@@ +\pend:defI\:tempc{\a:maketag} +\append:defI\:tempc{\b:maketag} +\NewConfigure{maketag}{2} +\HLet\maketag@@@\:tempc +\MathSymbol\mathrel{@cdots} +\MathSymbol\mathop{doteq} + \def\n:doteq:{\expandafter\:same \math:sym\mathop{doteq}\nolimits} +\HLet\dotsb@=\@cdots +\HLet\intdots@=\@cdots +\HRestore\cdots +\MathSymbol\mathop{iint} + \def\n:iint:{\expandafter\:same \math:sym\mathop{iint}\nolimits} +\MathSymbol\mathop{iiint} + \def\n:iiint:{\expandafter\:same \math:sym\mathop{iiint}\nolimits} +\MathSymbol\mathop{iiiint} + \def\n:iiiint:{\expandafter\:same \math:sym\mathop{iiiint}\nolimits} +\MathSymbol\mathop{idotsint} + \def\n:idotsint:{\expandafter\:same \math:sym\mathop{idotsint}\nolimits} +\def\:tempc#1{\a:underrightarrow + \o:underrightarrow:{#1}\b:underrightarrow} +\HLet\underrightarrow\:tempc +\NewConfigure{underrightarrow}{2} +\def\:tempc#1{\a:underleftarrow + \o:underleftarrow:{#1}\b:underleftarrow} +\HLet\underleftarrow\:tempc +\NewConfigure{underleftarrow}{2} +\def\:tempc#1{\a:overleftrightarrow + \o:overleftrightarrow:{#1}\b:overleftrightarrow} +\HLet\overleftrightarrow\:tempc +\NewConfigure{overleftrightarrow}{2} +\def\:tempc#1{\a:underleftrightarrow + \o:underleftrightarrow:{#1}\b:underleftrightarrow} +\HLet\underleftrightarrow\:tempc +\NewConfigure{underleftrightarrow}{2} + +\def\:tempc#1#2#3{\a:underarrow@ + \hbox{$\m@th#2#3$}\b:underarrow@ + \hbox{#1#2}\c:underarrow@ +} +\HLet\underarrow@\:tempc +\def\:tempc#1#2#3{\a:overarrow@ + \hbox{#1#2}\b:overarrow@ + \hbox{$\m@th#2#3$}\c:overarrow@ +} +\HLet\overarrow@\:tempc +\NewConfigure{underarrow@}{3} +\NewConfigure{overarrow@}{3} +\def\:temp#1#2{\a:overset\binrel@{#2}% + \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}\b:overset} +\HLet\overset\:temp +\NewConfigure{overset}{2} +\def\:temp#1#2{\a:underset\binrel@{#2}% + \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}\b:underset} +\HLet\underset\:temp +\NewConfigure{underset}{2} + +\MathSymbol\mathop{dotsc} +\MathSymbol\mathop{dotso} +\MathSymbol\mathrel{longleftarrow} +\MathSymbol\mathrel{longrightarrow} + +\ifx \ifinany@\:Undef + \let\:tempc\gather@split +\append:defIII\:tempc{% + \def\endmathdisplay@a{% + \math@cr \EndMkHalign + \RecallMkHalignConfig \csname b:gather\ifst@rred *\fi\endcsname + \egroup + }% +} +\HLet\gather@split\:tempc + +\else + \:warning{ams files too old for TeX4ht} +\fi +\Hinput{amsmath} +\endinput + |