\newcommand{\@entity}[1]{\@print{&}\@subst{#1}\@print{;}}
\newcommand{\@bigentity}[1]{\@print{<FONT SIZE=7>&}\@subst{#1}\@print{;</FONT>}}
\newcommand{\@numentity}[1]{\@print{&#}\@subst{#1}\@print{;}}
%% HTML 4.0 symbol entities
%% classes dans le meme ordre que
%% dans le livre LaTeX, de Leslie Lamport.
\renewcommand{\ldots}{\ifmath\@entity{hellip}\else{...}\fi}
\renewcommand{\cdots}{\@print{&#8943;}}
\renewcommand{\ddots}{\@print{&#8944;}}
\renewcommand{\vdots}{\@print{&#8942;}}
%% Greek Letters
\newcommand{\alpha}{\@print{&#945;}}
\newcommand{\beta}{\@entity{beta}}
\newcommand{\gamma}{\@entity{gamma}}
\newcommand{\delta}{\@entity{delta}}
\newcommand{\epsilon}{\@entity{epsilon}}
%\newcommand{\varepsilon}{\@entity{epsiv}}
\newcommand{\zeta}{\@entity{zeta}}
\newcommand{\eta}{\@entity{eta}}
\newcommand{\theta}{\@entity{theta}}
\newcommand{\vartheta}{\@entity{thetasym}}
\newcommand{\iota}{\@entity{iota}}
\newcommand{\kappa}{\@entity{kappa}}
\newcommand{\lambda}{\@entity{lambda}}
%\newcommand{\mu}{\@entity{mu}}
\newcommand{\nu}{\@entity{nu}}
\newcommand{\xi}{\@entity{xi}}
\newcommand{\pi}{\@entity{pi}}
\newcommand{\varpi}{\@entity{piv}}
\newcommand{\rho}{\@entity{rho}}
\newcommand{\varrho}{\@print{&#1009;}}
\newcommand{\sigma}{\@entity{sigma}}
\newcommand{\varsigma}{\@entity{sigmaf}}
\newcommand{\tau}{\@entity{tau}}
\newcommand{\upsilon}{\@entity{upsilon}}
\newcommand{\phi}{\@entity{phi}}
\newcommand{\varphi}{\@print{&#981;}}
\newcommand{\chi}{\@entity{chi}}
\newcommand{\psi}{\@entity{psi}}
\newcommand{\omega}{\@entity{omega}}

\newcommand{\Gamma}{\@entity{Gamma}}
\newcommand{\Delta}{\@entity{Delta}}
\newcommand{\Theta}{\@entity{Theta}}
\newcommand{\Lambda}{\@entity{Lambda}}
\newcommand{\Xi}{\@entity{Xi}}
\newcommand{\Pi}{\@entity{Pi}}
\newcommand{\Sigma}{\@entity{Sigma}}
\newcommand{\Upsilon}{\@entity{Upsilon}}
\newcommand{\Phi}{\@entity{Phi}}
\newcommand{\Psi}{\@entity{Psi}}
\newcommand{\Omega}{\@entity{Omega}}

%% Binary Operation Symbols
\newcommand{\mp}{\@print{&#8723;}}
%\newcommand{\ast}{\@entity{lowast}}
\renewcommand{\star}{\@print{&#8902;}}
\newcommand{\circ}{\@print{&#8728;}}
\newcommand{\bullet}{\@entity{bull}}
\renewcommand{\cdot}{\@entity{sdot}}
\newcommand{\cap}{\@entity{cap}}
\newcommand{\cup}{\@entity{cup}}
\newcommand{\uplus}{\@print{&#8844;}}
\newcommand{\sqcap}{\@print{&#8851;}}
\newcommand{\sqcup}{\@print{&#8852;}}
\newcommand{\vee}{\@entity{or}}
\newcommand{\wedge}{\@entity{and}}
%\newcommand{\setminus}{\@print{&#8725;}}
\newcommand{\wr}{\@print{&#8768;}}
\newcommand{\diamond}{\@entity{loz}}
\newcommand{\bigtriangleup}{\@print{&#9651;}}
\newcommand{\bigtriangledown}{\@print{&#9661;}}
%\newcommand{\triangleleft}{\@entity{triangleleft}}
%\newcommand{\triangleright}{\@entity{triangleright}}
%\newcommand{\lhd}{\@entity{LeftTriangle}}
%\newcommand{\rhd}{\@entity{RightTriangle}}
%\newcommand{\unlhd}{\@entity{LeftTriangleEqual}}
%\newcommand{\unrhd}{\@entity{RightTriangleEqual}}
\newcommand{\oplus}{\@entity{oplus}}
%\newcommand{\ominus}{\@entity{CircleMinus}}
\newcommand{\otimes}{\@entity{otimes}}
%\newcommand{\oslash}{\@entity{oslash}}
\newcommand{\odot}{\@entity{circ}}
\renewcommand{\bigcirc}{\@entity{bigcirc}}
\newcommand{\dagger}{\@entity{dagger}}
\newcommand{\ddagger}{\@entity{Dagger}}
%\newcommand{\amalg}{\@entity{amalg}}

% Relation Symbols
\newcommand{\leq}{\@entity{le}}
\newcommand{\prec}{\@print{&#8826;}}
\newcommand{\preceq}{\@print{&#8829;}}
\newcommand{\subset}{\@entity{sub}}
\newcommand{\subseteq}{\@entity{sube}}
\newcommand{\sqsubset}{\@print{&#8847;}}
\newcommand{\sqsubseteq}{\@print{&#8849;}}
\newcommand{\in}{\@entity{isin}}
\renewcommand{\vdash}{\@print{&#8866;}}
\newcommand{\geq}{\@entity{ge}}
\newcommand{\succ}{\@print{&#8827;}}
\newcommand{\supset}{\@entity{sup}}
\newcommand{\supseteq}{\@entity{supe}}
\newcommand{\sqsupset}{\@print{&#8847;}}
\newcommand{\sqsupseteq}{\@print{&#8849;}}
\newcommand{\ni}{\@entity{ni}}
\renewcommand{\dashv}{\@print{&#8867;}}
\newcommand{\equiv}{\@entity{equiv}}
\renewcommand{\sim}{\@entity{sim}}
\renewcommand{\simeq}{\@print{&#8771;}}
\newcommand{\asymp}{\@print{&#8781;}}
\newcommand{\approx}{\@entity{asymp}}
\newcommand{\cong}{\@entity{cong}}
\newcommand{\neq}{\@print{&#8802;}}
\newcommand{\doteq}{\@print{#8784;}}
\newcommand{\notin}{\@entity{notin}}
\renewcommand{\models}{\@print{&#8872;}}
\newcommand{\perp}{\bot}
\renewcommand{\mid}{\@entity{VerticalBar}}
\newcommand{\parallel}{\@entity{parallel}}
\newcommand{\bowtie}{\@entity{bowtie}}
%\newcommand{\Join}{\@entity{}}
\newcommand{\smile}{\@entity{smile}}
\newcommand{\frown}{\@entity{frown}}
\newcommand{\propto}{\@entity{Proportional}}

% Arrow Symbols
\newcommand{\leftarrow}{\@entity{larr}}
\newcommand{\Leftarrow}{\@entity{lArr}}
\newcommand{\rightarrow}{\@entity{rarr}}
\newcommand{\Rightarrow}{\@entity{rArr}}
\newcommand{\leftrightarrow}{\@print{&#8596;}}
\newcommand{\Leftrightarrow}{\@print{&#8660;}}
\renewcommand{\mapsto}{\@print{&#8614;}}
\newcommand{\hookleftarrow}{\@print{&#8618;}}
\newcommand{\leftharpoonup}{\@print{&#8636;}}
\newcommand{\leftharpoondown}{\@print{&#8637;}}
\newcommand{\rightleftharpoons}{\@print{&#8652;}}
\newcommand{\longleftarrow}{\leftarrow\@entity{mdash}}
\newcommand{\Longleftarrow}{\@print{&#57856;}}
\newcommand{\longrightarrow}{\@entity{mdash}\rightarrow}
\newcommand{\Longrightarrow}{\@print{&#57860;}}
\newcommand{\longleftrightarrow}{\leftarrow\rightarrow}
\newcommand{\Longleftrightarrow}{\@print{&#57856;}}
\newcommand{\longmapsto}{\@print{&#57864;}}
\newcommand{\hookrightarrow}{\@print{&#8618;}}
\newcommand{\rightharpoonup}{\@print{&#8640;}}
\newcommand{\rightharpoondown}{\@print{&#8641;}}
\newcommand{\leadsto}{\@print{&#8605;}}
\newcommand{\uparrow}{\@print{&#8593;}}
\newcommand{\Uparrow}{\@print{&#8657;}}
\newcommand{\downarrow}{\@print{&#8595;}}
\newcommand{\Downarrow}{\@print{&#8659;}}
\newcommand{\updownarrow}{\@print{&#8597;}}
\newcommand{\Updownarrow}{\@print{&#8661;}}
\newcommand{\nearrow}{\@print{&#8598;}}
\newcommand{\searrow}{\@print{&#8600;}}
\newcommand{\swarrow}{\@print{&#8601;}}
\newcommand{\nwarrow}{\@print{&#8598;}}

% Miscellaneous symbols
\newcommand{\aleph}{\@entity{alefsym}}
\newcommand{\hbar}{\@entity{hbar}}
\newcommand{\imath}{\@entity{imath}}
\newcommand{\jmath}{\@entity{jmath}}
\newcommand{\ell}{\@entity{ell}}
\newcommand{\wp}{\@entity{weierp}}
\newcommand{\Re}{\@entity{real}}
\newcommand{\Im}{\@entity{image}}
%\newcommand{\mho}{\@entity{mho}}
\newcommand{\prime}{\@entity{prime}}
\newcommand{\nabla}{\@entity{nabla}}
\newcommand{\surd}{\@entity{radic}}
\newcommand{\top}{\@entity{top}}
\renewcommand{\bot}{\@entity{perp}}
%\newcommand{\|}{\@entity{DoubleVerticalBar}}
\newcommand{\angle}{\@entity{lang}}
\newcommand{\forall}{\@entity{forall}}
\newcommand{\exists}{\@entity{exist}}
%latin1\newcommand{\neg}{\@entity{not}}
\newcommand{\flat}{\@entity{flat}}
\newcommand{\natural}{\@entity{natural}}
\newcommand{\sharp}{\@entity{sharp}}
%latin1\newcommand{\backslash}{\@entity{Backslash}}
\newcommand{\partial}{\@entity{part}}
\newcommand{\infty}{\@entity{infin}}
\newcommand{\Box}{\@entity{square}}
\newcommand{\Diamond}{\@entity{loz}}
\newcommand{\triangle}{\@entity{triangle}}
\newcommand{\clubsuit}{\@entity{clubs}}
\newcommand{\diamondsuit}{\@entity{diams}}
\newcommand{\heartsuit}{\@entity{hearts}}
\newcommand{\spadesuit}{\@entity{spades}}
%%% Delimiters
\newcommand{\lfloor}{\@entity{lfloor}}
\newcommand{\rfloor}{\@entity{rfloor}}
\newcommand{\lceil}{\@entity{lceil}}
\newcommand{\rceil}{\@entity{rceil}}
\newcommand{\langle}{\@entity{lang}}
\newcommand{\rangle}{\@entity{rang}}
 Variable-sized Symbols
\newcommand{\@sum}{\@entity{sum}}
\newcommand{\@prod}{\@entity{prod}}
\newcommand{\@coprod}{\@entity{coproduct}}
\newcommand{\@int}{\@entity{int}}
\newcommand{\@displayint}{\mbox{\Huge\@entity{int}}}
\newcommand{\@displaysum}{\mbox{\Huge\@entity{sum}}}
\newcommand{\@oint}{\@entity{oint}}
