[texhax] include graphicx

George Georgalis george at galis.org
Thu Mar 1 18:59:04 CET 2007


On Wed, Feb 28, 2007 at 05:26:02PM -0600, Karl Berry wrote:
>    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):
>
>\ifx\Hcode\undefined
>  \def\imgext{}% non-ht*
>\else
>  \def\imgext{.png}% ht*
>\fi
>...
>\includegraphics[...]{file\imgext}
>
>(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.

thanks, this is precisely the type of solution I was looking for.
I did look at the TeX4ht doc and found nothing, I think the author
'always' uses extensions when including graphics.

// George

-- 
George Georgalis, systems architect, administrator <IXOYE><


More information about the texhax mailing list