[OS X TeX] \ifpdf in TeX4ht?

Peter Dyballa Peter_Dyballa at Web.DE
Fri Mar 30 00:35:13 CEST 2007


Am 29.03.2007 um 15:05 schrieb Eitan Gurari:

>> There is one error with an included PNG image in the end:
>>
>> 	Execute script `File.lg'
>> 	----------------------------
>> 	t4ht.c (2006-09-13-14:28 kpathsea)
>> 	t4ht -f/File
>> 	(/usr/local/gwTeX/texmf.pkgs/tex4ht/base/win32/tex4ht.env)
>> 	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
>
>> size. I can't find in any file the invocation of ImageMagick's
>> convert that obviously produces the faulty EPS file.
>
> Ditto: can you place a, short if possible, sample latex file on the
> web demonstrating the problem and provide the url to the file.

I have no web server around. A simple example is this code:

	\documentclass[a4paper,11pt]{article}
	\usepackage{ifpdf}
	\ifpdf
	    \usepackage{cmap}
	    \usepackage[pdftex]{graphicx}
	    \usepackage[portrait,nohead]{geometry}
	%    \usepackage[activate={true,nocompatibility}]{microtype}
	%    \usepackage{lucida}
	%    \usepackage{hyperref}
	\else
	    \usepackage[dvips]{graphicx}
	    \usepackage[portrait,nohead]{geometry}
	    \DeclareGraphicsExtensions{.gif,.png,.eps,.ps,.jpeg}
	%    \usepackage[protrusion=true,expansion=false]{microtype}
	%    \usepackage{times}
	\fi
	\usepackage[english]{babel}
	\usepackage[T1]{fontenc}
	\usepackage[latin9]{inputenc}
	%\usepackage{texnames,soul}
	%\usepackage{array,ragged2e,longtable}
	\pagestyle{empty}
	
	\begin{document}
	\setlength{\unitlength}{1mm}
	\begin{picture}(70,70)
	\ifpdf
	  \put(100,18){\includegraphics*[height=80mm]{Image}}
	\else
	  \put(100,18){\includegraphics*[height=80mm,bb=0 0 328 406]{Image}}
	\fi
	\end{picture}
	\end{document}


Htlatex produces the strings "xx" and "PICT" in the DVI file, a  
simple latex only puts the image in the DVI output. With pdfTeX PNG  
is chosen, with latex GIF is chosen. Changing  
\DeclareGraphicsExtensions makes latex choose PNG, too. In htlatex's  
LOG file I can see:

	(1in=72.27pt, 1cm=28.45pt)
	-----------------------
	--- file File.css ---
	
	l.26 --- TeX4ht warning --- Missing file: File.css  ---
	l. 29 Writing File.idv[1] (File0x.png)

when invoked as

	htlatex File "html,css-in,info"

The CSS file is produced anyway, File0x.png does not seem to exist.

--
Greetings

   Pete

These are my principles and if you don't like them... well, I have  
others.
                                         - Groucho Marx



------------------------- 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