\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;}}
%Somme text commands available in LaTeX2e to give << absolute >> names to
%various languistic constructs.
\def\textvisiblespace{\@print{&#9251;}}
\def\textemdash{\@print{&mdash;}}
\def\textendash{\@print{&ndash;}}
\def\textexclamdown{\@print{&iexcl;}}
\def\textquestiondown{\@print{&iquest;}}
\def\textquotedblleft{\@print{&ldquo;}}
\def\textquotedblright{\@print{&rdquo;}}
\def\textquoteright{\@print{&rsquo;}}
\def\textquoteleft{\@print{&lsquo;}}
%
%
%% Greek Letters
%
\newcommand{\alpha}{\@print{&#945;}}
\newcommand{\beta}{\@entity{beta}}
\newcommand{\gamma}{\@entity{gamma}}
\newcommand{\delta}{\@entity{delta}}
\newcommand{\epsilon}{\@print{&#1108;}}			%EVENTUALLY 1013
\newcommand{\varepsilon}{\@entity{epsilon}}
\newcommand{\zeta}{\@entity{zeta}}
\newcommand{\eta}{\@entity{eta}}
\newcommand{\theta}{\@entity{theta}}
\newcommand{\vartheta}{\@print{&#977;}}%\@entity{thetasym}}
\newcommand{\iota}{\@entity{iota}}
\newcommand{\kappa}{\@entity{kappa}}
\newcommand{\lambda}{\@entity{lambda}}
\renewcommand{\mu}{\@entity{mu}}
\newcommand{\nu}{\@entity{nu}}
\newcommand{\xi}{\@entity{xi}}
\newcommand{\pi}{\@entity{pi}}
\newcommand{\varpi}{\@print{&#982;}}
\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}{\@print{&#981;}}
\newcommand{\varphi}{\@entity{phi}}
\newcommand{\chi}{\@entity{chi}}
\newcommand{\psi}{\@entity{psi}}
\newcommand{\omega}{\@entity{omega}}
%
\ifmoreentities\renewcommand{\epsilon}{\@print{&#1013;}}\fi
%
%% Capital Greek Letters
%
\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
%
\renewcommand{\pm}{\@print{&#0177;}}
\newcommand{\mp}{\@print{&#8723;}}
\renewcommand{\ast}{\@entity{lowast}}
\renewcommand{\star}{\@print{&#8902;}}
\newcommand{\circ}{\@print{&#8728;}}
\newcommand{\bullet}{\@print{&#8226;}}
\renewcommand{\cdot}{\@entity{sdot}}
\newcommand{\cap}{\@entity{cap}}
\newcommand{\cup}{\@entity{cup}}
\newcommand{\uplus}{\@print{&#8846;}}
\newcommand{\sqcap}{\@print{&#8851;}}
\newcommand{\sqcup}{\@print{&#8852;}}
\newcommand{\vee}{\@entity{or}}
\newcommand{\wedge}{\@entity{and}}
\renewcommand{\setminus}{\@print{&#92;}}
\newcommand{\wr}{\@print{&#8768;}}
\newcommand{\diamond}{\@print{&#9671;}}
\newcommand{\bigtriangleup}{\@print{<BIG>&#9651;</BIG>}}
\newcommand{\bigtriangledown}{\@print{<BIG>&#9661;</BIG>}}
\newcommand{\triangleleft}{\@print{&#9665;}}
\newcommand{\triangleright}{\@print{&#9655;}}
%\newcommand{\lhd}{\@print{&#9665;}}
%\newcommand{\rhd}{\@print{&#9655;}}
%\newcommand{\unlhd}{\@entity{LeftTriangleEqual}}
%\newcommand{\unrhd}{\@entity{RightTriangleEqual}}
\newcommand{\oplus}{\@entity{oplus}}
\newcommand{\ominus}{\@print{&#8854;}}
\newcommand{\otimes}{\@entity{otimes}}
\newcommand{\oslash}{\@print{&#8856;}}
\newcommand{\odot}{\@print{&#8857;}}   	
\renewcommand{\bigcirc}{\@print{&#9711;}}
\newcommand{\dagger}{\@print{<SMALL>&#8224;</SMALL>}}  % better but bold
\newcommand{\ddagger}{\@print{<SMALL>&#8225;</SMALL>}} % better but bold
\newcommand{\amalg}{\@print{<SMALL>&#1062;</SMALL>}}   % EVENTUALLY 10815
%
%% Relation Symbols (Table 8.5 of 'Goos-Mitt-Sam')
%
\newcommand{\leq}{{\@print{&#8804;}}}     %{\@entity{le}} 
\renewcommand{\le}{\@print{&#8804;}}
\newcommand{\geq}{\@print{&#8805;}}	%entity{ge}}
\renewcommand{\ge}{\@print{&#8805;}}
\newcommand{\equiv}{\@entity{equiv}}
\renewcommand{\models}{\@print{&#8872;}}
\newcommand{\prec}{\@print{&#8826;}}
\newcommand{\succ}{\@print{&#8827;}}
\renewcommand{\sim}{\@entity{sim}}
\newcommand{\perp}{\bot}
\newcommand{\preceq}{\@print{&#8828;}}
\newcommand{\succeq}{\@print{&#8829;}}
\renewcommand{\simeq}{\@print{&#8771;}}
\renewcommand{\mid}{\@print{&#8739;}}
\renewcommand{\ll}{\@print{&#8810;}}
\renewcommand{\gg}{\@print{&#8811;}}
\newcommand{\asymp}{\@print{&#8781;}}
\newcommand{\parallel}{\@print{&#8741;}}
\newcommand{\subset}{\@entity{sub}}
\newcommand{\supset}{\@entity{sup}}
\newcommand{\approx}{\@print{&#8776;}}
\newcommand{\bowtie}{\@print{&#8904;}}
\newcommand{\subseteq}{\@entity{sube}}
\newcommand{\supseteq}{\@entity{supe}}
\newcommand{\cong}{\@entity{cong}}
\newcommand{\Join}{\@print{&#8904;}}
\newcommand{\sqsubset}{\@print{&#8847;}}
\newcommand{\sqsupset}{\@print{&#8847;}}
\newcommand{\neq}{\@print{&#8800;}}
\newcommand{\smile}{\@print{&#8255;}}
\newcommand{\sqsubseteq}{\@print{&#8849;}}
\newcommand{\sqsupseteq}{\@print{&#8849;}}
\newcommand{\doteq}{\@print{&#8784;}}
\newcommand{\frown}{\@print{&#8256;}}
\newcommand{\in}{\@entity{isin}}
\newcommand{\ni}{\@entity{ni}}
\newcommand{\propto}{\@print{&#8733;}}
\renewcommand{\vdash}{\@print{&#8866;}}
\renewcommand{\dashv}{\@print{&#8867;}}
\newcommand{\notin}{\@print{&#8713;}}
%
%% Arrow Symbols (Table 8.6 of 'Goos-Mitt-Sam')
%
\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{&#8617;}}
\newcommand{\leftharpoonup}{\@print{&#8636;}}
\newcommand{\leftharpoondown}{\@print{&#8637;}}
\newcommand{\rightleftharpoons}{\@print{&#8652;}}
\newcommand{\longleftarrow}{\leftarrow\@entity{mdash}} 	% EVENTUALY 10229
\newcommand{\Longleftarrow}{\Leftarrow}			% EVENTUALY 10232
\newcommand{\longrightarrow}{\@entity{mdash}\rightarrow}% EVENTUALY 10230
\newcommand{\Longrightarrow}{\Rightarrow}		% EVENTUALY 10233
\newcommand{\longleftrightarrow}{\leftarrow\rightarrow} % EVENTUALY 10231
\newcommand{\Longleftrightarrow}{\Leftarrow\Rightarrow} % EVENTUALY 10234
\newcommand{\longmapsto}{\vdash\rightarrow}		% EVENTUALY 10236
\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{\@displayUpdownarrow}{\mbox{\@print{&#8657;}\@br\@print{&#8659;}}}
\newcommand{\nearrow}{\@print{&#8598;}}
\newcommand{\searrow}{\@print{&#8600;}}
\newcommand{\swarrow}{\@print{&#8601;}}
\newcommand{\nwarrow}{\@print{&#8598;}}
%
%% Eventually these commands would be activated (currently with '-moreentities')
%
%\renewcommand{\longleftarrow}{\@print{&#10229;}}
%\renewcommand{\Longleftarrow}{\@print{&#10232;}}
%\renewcommand{\longrightarrow}{\@print{&#10230;}}
%\renewcommand{\Longrightarrow}{\@print{&#10233;}}
%\renewcommand{\longleftrightarrow}{\@print{&#10231;}}
%\renewcommand{\Longleftrightarrow}{\@print{&#10234;}}
%\renewcommand{\longmapsto}{\@print{&#10236;}}
%
\ifmoreentities
\renewcommand{\longleftarrow}{\@print{&#10229;}}%
\renewcommand{\Longleftarrow}{\@print{&#10232;}}%
\renewcommand{\longrightarrow}{\@print{&#10230;}}%
\renewcommand{\Longrightarrow}{\@print{&#10233;}}%
\renewcommand{\longleftrightarrow}{\@print{&#10231;}}%
\renewcommand{\Longleftrightarrow}{\@print{&#10234;}}%
\renewcommand{\longmapsto}{\@print{&#10236;}}%
\else\fi
%
%% Miscellaneous symbols (Table 8.7 of 'Goos-Mitt-Sam')
%
\newcommand{\aleph}{\@print{&#8501;}}
\newcommand{\prime}{\@entity{prime}}
\newcommand{\forall}{\@entity{forall}}
\newcommand{\infty}{\@entity{infin}}
\newcommand{\hbar}{\@print{&#8463;}}
\renewcommand{\emptyset}{\@print{&#8709;}}
\newcommand{\exists}{\@entity{exist}}
\newcommand{\nabla}{\@entity{nabla}}
\newcommand{\surd}{\@entity{radic}}
\newcommand{\triangle}{\@print{&#9651;}}
\newcommand{\imath}{\@print{<I>&#953;</I>}}
\newcommand{\jmath}{\@print{<I><SMALL>j</SMALL></I>}} %????
\newcommand{\ell}{\@print{&#8467}}
\renewcommand{\neg}{\@entity{not}}
\newcommand{\top}{\@print{&#8868;}}
\newcommand{\flat}{\@print{&#9837;}}   		% EVENTUALLY
\newcommand{\natural}{\@print{&#9838;;}} 	% EVENTUALLY
\newcommand{\sharp}{\@print{&#9839;}}		% EVENTUALLY
\newcommand{\wp}{\@entity{weierp}}
\renewcommand{\bot}{\@entity{perp}}
\newcommand{\clubsuit}{\@entity{clubs}}
\newcommand{\diamondsuit}{\@entity{diams}}
\newcommand{\heartsuit}{\@entity{hearts}}
\newcommand{\spadesuit}{\@entity{spades}}
\newcommand{\Re}{\@print{&#8476;}}
\newcommand{\Im}{\@entity{image}}
\newcommand{\angle}{\@print{&#8736;}}
\newcommand{\partial}{\@entity{part}}
%
%\newcommand{\square}{\@print{&#9723;}}
%\newcommand{\Box}{\@print{&#9723;}}
%\newcommand{\Diamond}{\@entity{loz}}
%\newcommand{\mho}{\@print{&#8487;}}
%
%% 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}}
\renewcommand{\|}{\@print{&#8741;}}
%
%% Variable-sized Symbols
%
\newcommand{\@sum}{\@entity{Sigma}}
\newcommand{\@prod}{\@entity{Pi}}
\newcommand{\@coprod}{\@print{&#1062;}}
\newcommand{\@int}{\@entity{int}}
\newcommand{\@iint}{\@print{&#8748;}}
\newcommand{\@iiint}{\@print{&#8749;}}
\newcommand{\@oint}{\@print{&#8750;}}
\newcommand{\@oiint}{\@print{&#8751;}}
\newcommand{\@oiiint}{\@print{&#8752;}}
\newcommand{\@displayint}{\mbox{\Large\@entity{int}}}
\newcommand{\@displayiint}{\mbox{\Large\@print{&#8748;}}}
\newcommand{\@displayiiint}{\mbox{\Large\@print{&#8749;}}}
\newcommand{\@displaysum}{\mbox{\Large\@entity{Sigma}}}
\newcommand{\@displayprod}{\mbox{\Large\@entity{Pi}}}
\newcommand{\@displaycoprod}{\mbox{\Large\@print{&#1062;}}}
\newcommand{\@displayoint}{\mbox{\Large\@print{&#8750;}}}
\newcommand{\@displayoiint}{\mbox{\Large\@print{&#8751;}}}
\newcommand{\@displayoiiint}{\mbox{\huge\@print{&#8752;}}}
%
%% Additional
%
\newcommand{\dag}{\@print{&#8224;}}

%\newcommand{\mathit}[1]{\@open{I}{}#1\@close{I}}
%\let\mathrm\@mathrm%
%\let\mathtt\@mathtt%
%\ifmoreentities
%\let\mathcal\@mathcal%
%\let\mathsf\@mathsf%
%\let\mathbf\@mathbf%
%\fi

%
%% Definition for big left and right brackets
%
\def\bigl#1{\ifdisplay{\large #1}\else{\large #1}\fi}
\def\bigr#1{\ifdisplay{\large #1}\else{\large #1}\fi}
\def\Bigl#1{\ifdisplay{\Large #1}\else{\large #1}\fi}
\def\Bigr#1{\ifdisplay{\Large #1}\else{\large #1}\fi}
\def\biggl#1{\ifdisplay{\huge #1}\else{\large #1}\fi}
\def\biggr#1{\ifdisplay{\huge #1}\else{\large #1}\fi}
\def\Biggl#1{\ifdisplay{\Huge #1}\else{\large #1}\fi}
\def\Biggr#1{\ifdisplay{\Huge #1}\else{\large #1}\fi}