[texhax] include graphicx

George Georgalis george at galis.org
Wed Mar 14 19:14:23 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.)

with this method, I cannot get htlatex to find the graphic file.
file not found, though I verified the file, with the correct
extension in the error, is available.

I also tried putting the graphic in the same directory as the
source tex, got the same error, path is right but file not found.

a secondary problem is, if a .png file is available pdflatex
prefers it over the over the ray-traced .pdf file of the same
name. I recall there is a method for ordering graphic format
preference withing pdflatex, but cannot find now.

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

none.

// George


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


More information about the texhax mailing list