[l2h] latex2html

Ming Jiang ming-jiang@uiowa.edu
Fri, 16 Nov 2001 02:14:53 -0600

Ross Moore wrote:
> Hello Ming Jiang
> you wrote:
> > I am using subfigure with my latex document since there are a lot of
> > figures. Is there any way to get latex2html to work with subfigure? Some
> In what way does it not work with subfigure ?
> If your subfigures are with a figure, the the default is for LaTeX2HTML
> to make an image of the complete figure.
> If you do not want this, then use the {makeimage} environment,
> defined in the  html.sty  package.
> \begin{figure}
> \begin{center}
> \begin{makeimage}
>  ... contents for an image .... (perhaps empty)
> \end{makeimage}
>  ...  other figure contents ...
> \end{center}
> \caption{...}
> \end{figure}
> Now the contents of the {makeimage} environment will be typeset
> by LaTeX for an image, with everything else being handled as best
> possible for HTML --- for {subfigure}s, this will mean a separate
> image for each.
> Having empty contents of the {makeimage} is a useful strategy,
> that forces the LaTeX code inside the {figure} to be scanned
> in detail. The resulting text and images are set inside
> <TABLE>...</TABLE> tags in the resulting HTML.
> If this does not give you an acceptable result, then please
> post on the web an example document that:
>  1. shows what LaTeX2HTML currently does;
>  2. links to a .dvi, .ps or .pdf showing what you would like;
>  3. links to your LaTeX source for testing;
> then email a URL to this example.
> > one suggested me to modify the html files generated by latex2html. It
> > seems to be a painful job....
> > Also is there any way to make latex2html support the "ifthen" package?
> That's a lot harder, since the expansion model for LaTeX2HTML cannot
> guarantee to give the same result as TeX in many situations.
> It all depends upon what type of calculation is being performed
> to produce the condition being tested.
> Please give an example of the kind of test you are performing,
> and what kind of information is being handled (i.e. either being
> included or being left out) as a result of the test.
> LaTeX2HTML provides conditional constructions;
>  e.g.  \begin{htmlonly}   and  similarly for {latexonly}
>         ....
>        \end{htmlonly}
> and
>  %begin{latexonly}
>   ....
>  %end{latexonly}
> which usually allow all conditionals to be handled without need
> to postprocess the HTML afterwards.
> Hope this helps,
>         Ross Moore

Hi, Ross:

Thanks for your help. I have put the files under

(all .tex, .eps, .png, .bb files)

(the pdf file by pdflatex, i.e., the layout I'd like to get)

(html translated with makeimage environment)

(html translated without makeimage environment)

there are several problems:

(1) The layout with makeimage is better than that without makeimage, but
still it does not look as good as the one in the pdf file.

(2) Without makeimage, the images are scattered, together with the
captions. latex2html does not produce one figure. (I may be wrong, may
some latex2html trick can solve this problem)

(3) The cross ref/link does not lead to the right image in both case.

(4) I got gray background for the images with makeimage, they look worse
than those without makeimage.

(5) I'd like to use one set of tex file to produce pdf/dvi/ps/html
output. So I have all my image files in the png format. Please have a
look at the master file dbct.tex. There I used a script pngtoeps to
convert png file to eps file. But I am having problem when using
makeimage: in this situation, latex2html will produce an image from the
latex output, which will invoke my script pngtoeps to finish the
translation job; but in running latex2html, it complains "cannot open"
the image file (in fact that complain comes from my script, but it seems
that latex2html does not tell it the right file location). When I change
the image format to eps, it works(?). 

(6) The information about my computer is:
$ latex2html -V
This is LaTeX2HTML Version 2K.1beta (1.57)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.

$ rpm -q netpbm

$ rpm -q tetex

OS is Redhat 7.1

Thanks for your time and help.