<..amsthm.4ht..>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% amsthm.4ht 2014-07-12-22:36 %
% Copyright (C) 1997--2009 Eitan M. Gurari %
<.TeX4ht copyright.>
<.body of amsthm.sty.>
<.theorem in amsthm.sty.>
\Hinput{amsthm}
\endinput
-_-_-
<..body of amsthm.sty..>
<.qed symbol.>
-_-_-
<..qed symbol..>
\def\qed:sym{%
\leavevmode\Picture+[Q.E.D.]{}\o:qedsymbol:\EndPicture
\SavePicture\qed:sym[Q.E.D.] }
\def\:temp{\qed:sym }
\MathSymbol\mathop{qedsymbol}
-_-_-
<..shared ams thm/cls..>
\ifx \deferred@thm@head\:UnDef\else
\expandafter\dth@everypar\expandafter{%
\the\dth@everypar
\edef\:temp{\the\ht:everypar}\ifx \:temp\empty
\ht:everypar{\HtmlPar}\ShowPar
\fi
}%
<.revised begintheorem.>
\fi
-_-_-
<..revised begintheorem..>
\def\deferred@thm@head#1{%
\if@inlabel \indent \par \fi eject a section head if one is pending
\if@nobreak
\adjust@parskip@nobreak
\else
\addpenalty\@beginparpenalty
\addvspace\@topsep
\addvspace{-\parskip}%
\fi
\global\@inlabeltrue
\ht:everypar\dth@everypar
\let\sv:newtheorem=\b:newtheorem \let\b:newtheorem=\empty
\item[\normalfont#1]%
\let\b:newtheorem=\sv:newtheorem \b:newtheorem \ignorespaces
}
-_-_-
The old version of amsthm used ‘\item[\normalfont#1]’ instead of ‘\sbox\@labels{\normalfont#1}’–it is preferable for tex4ht, in case the lemma starts with something like ‘\begin{equation}’.
The following code is for the cases that the \refstercounter is ignored in \@thm.
<..theorem in amsthm.sty..>
\def\:temp{\ShowRefstepAnchor\o:@begintheorem:}
\HLet\@begintheorem=\:temp
<.shared ams thm/cls.>
-_-_-
<..shared ams thm/cls..>+
\def\:temp#1{%
\def\:temp{#1}%
\edef\:temp{\expandafter\eorem:syle \meaning\:temp<.par del.>}%
\expandafter\let\expandafter\@tmp:sv\csname th@\:temp\endcsname
\def\:tempa##1{%
\expandafter\append:def\csname th@##1\endcsname{%
\expandafter\let\csname th@##1\endcsname=\@tmp:sv
\let\thm:headnl=\thmheadnl
\pend:def\thmheadnl{\let\thmheadnl\thm:headnl \b:newtheorem}%
\append:def\thmheadnl{\expandafter
\ht:everypar\expandafter{\the\ht:everypar
\ht:everypar{\HtmlPar}}}}}%
\expandafter\:tempa\expandafter{\:temp}%
\let\sv:trivlist=\trivlist
\def\trivlist{\let\trivlist\sv:trivlist \let\sv:trivlist\:unDef
\a:newtheorem \trivlist}%
\aftergroup\c:newtheorem
\:thm{#1}}
\HLet\@thm\:temp
\HRestore\@endtheorem
-_-_-
The @thm appends its setting to the hook of theoremstyle:
<..shared ams thm/cls..>+
\bgroup
\def\bgroup{\catcode‘\\=0 \catcode‘\t=11 }
\catcode‘\/=0
\catcode‘\@=12
\catcode‘\h=12
\catcode‘\\=12
/catcode‘/t=12
/edef~{/def/noexpand/eorem:syle##1\th@##2 <.par del.>{##2}}
/bgroup
\expandafter\egroup ~
-_-_-
<..shared ams thm/cls..>+
\long\def\:temp[#1]{\par\a:proof
\csname o:\string\proof :\endcsname[#1]\b:proof}
\expandafter\HLet\csname \string\proof \endcsname=\:temp
\append:def\endproof{\c:proof}
\NewConfigure{proof}{3}
-_-_-