[texhax] include graphicx

Karl Berry karl at freefriends.org
Thu Mar 1 00:26:02 CET 2007

    I'd like to specify the 'image' filename and let pdflatex use
    the image.pdf file while htlatex incorporates the image.png file

Maybe the default extension that can be specified when you load the
graphicx (if that's what we're talking about) driver -- you could do it
conditionally, based on whether pdflatex or htlatex is being used.  If
not supported directly, you could hack around it as below.

I don't know of an official way to distinguish, but I surmise this would
do the job (untested of course):

  \def\imgext{}% non-ht*
  \def\imgext{.png}% ht*

(I got \Hcode just by looking at the tiny htlatex script.)

You might also check the tex4ht docs to see if there's any advice
related this.

Hope this helps.

More information about the texhax mailing list