[OS X TeX] \ifpdf in TeX4ht?

Peter Dyballa Peter_Dyballa at Web.DE
Sat Mar 31 17:38:17 CEST 2007

Am 31.03.2007 um 15:19 schrieb Eitan Gurari:

> I don't follow. I'll need to see a sample latex code to be able to
> deal with the problem.

This problem is solved. Partly I had unnecessary code, partly I did  
not see this.

>> What is remaining is that the picture from the previous example
>> cannot be put into the HTML output. If I edit the HTML file and
>> replace the wrong file name for the picture with its original name,
>> it gets included without scaling and without horizontal offset ...
> I guess a possible approach would be to define a private macro for
> importing pictures with different interpretations for pdf and html
> output formats.

Therefore I have the \ifpdf clause, but in the end TeX4ht fails to  
handle the image file. No matter what file type I offer (or not  
offer), the HTML output has no working picture because something fails:

	Execute script `File.lg'
	t4ht.c (2006-09-13-14:28 kpathsea)
	t4ht -f/File.tex
•this could be a good reason why gs fails: I have installed a newer  
version with MiKTeX Package Manager•
	Entering File.lg
	System call: if exist zzFile.ps DEL zzFile.ps >nul
	sh: -c: line 2: syntax error: unexpected end of file
	--- Warning --- System return: 512
	Entering File.css
	Entering File.tmp

I then used my TeX Live 2007 DVD. It does a better job with t4ht.c  
(2007-01-05-03:17 kpathsea), no error and a PNG picture: which has  
clipped off about 80 % of its original contents, only feet and shin  
bones are visible. The same happens when I update local /usr/local/ 
gwTeX/texmf.pkgs/tex4ht/base/unix from the DVD.

	Execute script `File.lg'
	t4ht.c (2007-01-05-03:17 kpathsea)
	t4ht dirchar
	Entering File.lg
	System call: dvips -E -Ppdf -mode ibmvga -D 110 -f File.idv -pp 1  >  
	This is dvips(k) 5.96 Copyright 2005 Radical Eye Software  
	' TeX output 2007.03.31:1648' ->
	<tex.pro><alt-rule.pro><cm-super-t1.enc><texps.pro><special.pro>. [1
	System return: 0
	System call: convert -trim +repage -density 110x110 -transparent  
'#FFFFFF' zzFile.ps File0x.png
	System return: 0
	System call: rm zzFile.ps
	System return: 0
	Entering File.css
	Entering File.tmp

Original PNG file has:

   pixelWidth: 456
   pixelHeight: 564

TeX4ht's copy has:

   pixelWidth: 47
   pixelHeight: 17

(found with 'sips --getProperty all <file name>')

convert --version
Version: ImageMagick 6.3.2 02/25/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC



"It isn't pollution that's harming the environment. It's the  
impurities in our air and water that are doing it."

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/

More information about the macostex-archives mailing list