[l2h] Interaction with pdf-TeX

Bruce Miller bruce.miller at nist.gov
Sun Aug 3 20:57:41 CEST 2003


Phil Lanch wrote:
> On Thu, Jul 31, 2003 at 04:42:40PM -0800, Herb W. Swan wrote:
 >>To what extent are latex2html and pdf-TeX compatible?
> 
> 
> as above, you can use both of them with the same source file.
> 
> 
>>Would I be able to insert my figures into my final
>>pdf file if I used pdf-TeX in conjunction with
>>latex2html?
> 
> 
> i don't know if you can do that (or if you really want to).

Depending on what you mean, you can and should want to! :>

Ideally, you'd use the graphicx (or graphics) package, and
include all your figures with 
  \includegraphics[...]{filename}
If you give the filename _without_ the extension, the driver
will hunt for an image of the most appropriate type.

By default, the graphicx packages under latex will assume 
that dvips will be the driver, so they will search for .ps or .eps

When run under pdflatex, I believe it detects(*) that and searches
for .png and .jpeg (I believe that's what pdftex will accept)

Under latex2html, the implementation graphicx.perl will look for
web-appropriate image types; .gif, .jpg, .png.

So, generally, you get the `right thing' and you can do the 
image conversions yourself with the eventual target in mind (**)

Hope that helps...
Bruce

(*) at worst, you'd have to do something like \usepackage[pdf]{graphicx} ??
(**) You can also use some tricky commands in graphicx to automatically
do conversions between file types, but that's beyond the scope here.



More information about the latex2html mailing list