\batchmode
\documentstyle[12pt,psfig]{article}
\makeatletter
\thispagestyle{empty}
\headheight=0pt
\headsep=0pt
\textheight=8in
\oddsidemargin=0in
\textwidth=6.5in

\makeatother
\newenvironment{tex2html_wrap}{}{}
\newwrite\lthtmlwrite
\def\lthtmltypeout#1{{\let\protect\string\immediate\write\lthtmlwrite{#1}}}%
\newbox\sizebox
\begin{document}
\pagestyle{empty}
{\newpage
\clearpage
\samepage \begin{equation}S ~=~ - p_i \: \sum \: p_i \ln p_i ~,
\end{equation}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$S \approx 4.2$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline40: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

\stepcounter{section}

\end{document}
