[l2h] problem with translating ps figures

rpgoldman at sift.info rpgoldman at sift.info
Tue Jan 17 17:39:07 CET 2006


>>>>> "RM" == Ross Moore <ross at ics.mq.edu.au> writes:

    RM> Hello Robert,
    RM> On 05/01/2006, at 5:39 AM, Robert P. Goldman wrote:

    >> 
    >> I have been having some troubles translating postscript figures in
    >> latex2html.  I am getting simple gray boxes as output.

[...snip...]

    >> But what's
    >> most frustrating is that I can actually translate the figures by hand,
    >> into perfectly acceptable gifs using the following snippet:
    >> 
    >> gs -q -DNOPAUSE -sDEVICE=ppmraw -r$R -sOutputFile='|pnmcrop|ppmtogif
    >> -interlace > $file.gif' -- $file
    >> 
    >> Unfortunately, I don't see any obvious way to either fix what
    >> latex2html is doing, or to simply say "here are a bunch of figure
    >> files --- don't bother translating yourself, just use these."

    RM> If you already have .gif or .jpg or .png  images, then it's
    RM> easy enough to use "conditional" coding, with the  \htmladdimg
    RM> command giving links for the HTML files.

    RM> For example,

    RM> %begin{latexonly}
    RM>   \includegraphics{figs/myimage.ps}
    RM> %end{latexonly}
    RM> \htmladdimg[... options ...]{../figs/myimage.gif}


    RM> where the images are in a subfolder  figs/  of the working
    RM> directory. Note that LaTeX2HTML creates the HTML files within
    RM> a subfolder also, so you need to get the relative path correct.

[...snip...]

I apologize for bothering you all again, but this doesn't seem to work
for me.  Here's an example of what I do:

\begin{figure}
  \htmlimage{notransparent}
  \begin{center}
\begin{latexonly}
    \epsfig{file=opal-inheritance.ps,width=.9\textwidth}
\end{latexonly}
    \htmladdimg{../gifs/opal-inheritance.gif}
  \end{center}
\caption{The inheritance hierarchy among some of the Garnet prototype objects.
All of the standard shapes in garnet are instances of the
\pr{graphical-object} prototype.  As an example of inheritance, the
\pr{circle} and \pr{oval} objects are both special types of arcs, and
they inherit most of their properties from the \pr{arc} prototype
object.  The Gadgets (the Garnet widgets) are not pictured in this
hierarchy, but most of them are instances of the \pr{aggregadget} object.}
\tag{opalInheritance}
\end{figure}

This yields LaTeX output that's just fine.  But when I use LaTeX2HTML,
I get the following HTML generated:

<DIV ALIGN="CENTER"><A NAME="1032"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 2.1:</STRONG>
The inheritance hierarchy among some of the Garnet prototype objects.
All of the standard shapes in garnet are instances of the
<TT>graphical-object</TT> prototype.  As an example of inheritance, the

<TT>circle</TT> and <TT>oval</TT> objects are both special types of arcs, and
they inherit most of their properties from the <TT>arc</TT> prototype
object.  The Gadgets (the Garnet widgets) are not pictured in this
hierarchy, but most of them are instances of the <TT>aggregadget</TT> object.</CAPTION>
<TR><TD><IMG
 WIDTH="14" HEIGHT="10" BORDER="0"
 SRC="img1.png"
 ALT="\begin{figure}\begin{center}
\htmladdimg{../gifs/opal-inheritance.gif}
\end{center}
\end{figure}"></TD></TR>
</TABLE>
</DIV>


I.e., it seems to ignore my \latexonly command, try to translate the
image anyway, and ignores my htmladdimg.  Am I committing some howler
here?  Any suggestions will be very much appreciated!

Best,
R



-- 
Robert P. Goldman
Senior Scientist
Smart Information Flow Technologies (d/b/a SIFT, LLC)

211 N. First St., Suite 300
Minneapolis, MN 55401

Voice:	(612) 384-3454
Email:    rpgoldman at SIFT.info



More information about the latex2html mailing list