[l2h] Problem with \newcommand interpretation

C. Nataraj C. Nataraj" <c.nataraj@villanova.edu
Fri, 4 Aug 2000 16:08:26 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_001F_01BFFE2E.38FDA180
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Greetings!

I am very new to LaTeX2HTML, although I have been TeXing for a decade or =
so.  I have a problem where a \newcommand I have defined becomes garbled =
in LaTeX2HTML, but not in LaTex2e.  In other words, this file processes =
normally in LaTex (dvi, ps, and pdf files are fine), but gives me an =
html file with no figure: just some text (from the file below, I get =
"fig1.eps"), followed by the correct caption in a figure environment.

The smallest atom of my code that exhibited this problem is listed =
below.  If I include the eps file without using my newcommand (by =
directly typing  \includegraphics), it works fine.  This is part of a =
source with over a hundred figures, and I would hate to redo everything =
just to get html output.

I am using Latex2HTML version 99.2beta8 <1.42> on a WinNT box and MikTeX =
1.15.

Any help will be most appreciated.

Nat
____________________________________________________________
\documentclass{book}
\usepackage[dvips]{color,graphics}
\usepackage{html}

\newcommand{\epsfigure}[2]{\begin{figure}%
\centerline{\includegraphics{#1.eps}}%
\caption{#2}%
\label{fig:#1}%
\end{figure}}

\begin{document}

% fig1.eps exists in the current directory
\epsfigure{fig1}{An interesting result}

\end{document}

__________________________________________________
Dr. C. 'Nat' Nataraj
Villanova University, Villanova, PA 19085
Tel: 610-519-4994, Fax: 610-519-6515
E-mail: nataraj@villanova.edu
http://faculty.engineering.villanova.edu/cnataraj/main.html
__________________________________________________


------=_NextPart_000_001F_01BFFE2E.38FDA180
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Greetings!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>I am very new to LaTeX2HTML, although I have been =
TeXing for a=20
decade or so.&nbsp; I have a problem where a \newcommand I have defined =
becomes=20
garbled in LaTeX2HTML, but not in LaTex2e.&nbsp; In other words, this =
file=20
processes normally in LaTex (dvi, ps, and pdf files are fine), but gives =
me an=20
html file with no figure: just some text (from the file below, I get =
<FONT=20
color=3D#0000ff>"fig1.eps"</FONT>), followed by the correct caption in a =
figure=20
environment.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>The smallest atom of my code that exhibited this =
problem is=20
listed below.&nbsp; If I include the eps file without using my =
newcommand (by=20
directly typing  \includegraphics), it works fine.&nbsp; This is part of =

a&nbsp;source with over a hundred figures, and I would hate to redo =
everything=20
just to get html output.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>I am using Latex2HTML version 99.2beta8 &lt;1.42&gt; =
on a=20
WinNT box and MikTeX 1.15.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>Any help will be most appreciated.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>Nat</FONT></DIV>
<DIV>____________________________________________________________</DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>\documentclass{book}<BR>\usepackage[dvips]{color,graphics}<BR>\u=
sepackage{html}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>\newcommand{\epsfigure}[2]{\begin{figure}%<BR>\centerline{\inclu=
degraphics{#1.eps}}%<BR>\caption{#2}%<BR>\label{fig:#1}%<BR>\end{figure}}=
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>\begin{document}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>% fig1.eps exists in the =
current=20
directory</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>\epsfigure{fig1}{An interesting =

result}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>\end{document}</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT =
size=3D1>__________________________________________________<BR>Dr. C.=20
'Nat' Nataraj<BR>Villanova University, Villanova, PA 19085<BR>Tel: =
610-519-4994,=20
Fax: 610-519-6515<BR>E-mail: <A=20
href=3D"mailto:nataraj@villanova.edu">nataraj@villanova.edu</A><BR><A=20
href=3D"http://faculty.engineering.villanova.edu/cnataraj/main.html">http=
://faculty.engineering.villanova.edu/cnataraj/main.html</A><BR>__________=
________________________________________<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_001F_01BFFE2E.38FDA180--