[OS X TeX] \ifpdf in TeX4ht?

Eitan Gurari gurari at cse.ohio-state.edu
Thu Mar 29 22:00:41 EDT 2007


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

The pdf mode is irrelevant for tex4ht.  Does a compilation for
postscript format provide a proper output (e.g., latex + dvips)?  That
is the mode that matters for tex4ht, and I was not able to get it
working.

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

The warning message is wrong.  I fixed the problem in the tex4ht
distribution.

-eitan



------------------------- 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 MacOSX-TeX mailing list