[OS X TeX] Preparation of illustrations for press

Bruno Voisin bvoisin at mac.com
Wed Mar 26 03:52:02 EDT 2008


Le 26 mars 08 à 08:00, Bernhard Barkow a écrit :

> [...]
> Since pdflatex (assuming you want to use pdflatex) cannot include  
> TIFs, using PDF is a good choice, better than PNG simply for color  
> management reasons (I don't know if profiles can be embedded in  
> PNGs, and how pdflatex would handle them; apart from that, PNGs can  
> only be RGB, not CMYK as far as I know).

There seem to be two options to include TIFF files in LaTeX documents :

- Convert TIFF to PDF, then use pdfTeX. The TIFF library (libtiff  
available through i-Installer) provides a command-line tool tiff2pdf.  
A GUI alternative is Preview (open the TIFF file, then Save As and  
choose the PDF format).

- Convert TIFF to PNG, say, then use pdfTeX. OS X provides a command- 
line tool called sips (for scriptable image processing system)  
allowing manipulation of raster image files. I just tried

	sips --setProperty format png afile.tif --out afile.png

which seems to work. Preview, again, offers a GUI alternative.

- Use XeTeX, making sure that it calls behind the lines the XDVI-to- 
PDF converter xdv2pdf. XDVI is XeTeX's extended DVI format. xdv2pdf  
allows direct inclusion of TIFF files. In the version of XeTeX  
included in TeXLive-2007 (and hence MacTeX), xdv2pdf is the default  
XDVI-to-PDF converter. In the bleeding-edge version available from the  
XeTeX SVN repository, the cross-platform xdvipdfmx has replaced the OS  
X-specific xdv2pdf as the default XDVI-to-PDF converter. Alas,  
xdvipdfmx can't include TIFF files. Hence, you've got to specify using  
xdv2pdf. For example, I've created a new TeXShop engine XeLaTeX- 
xdv2pdf.engine containing

	#!/bin/tcsh

	set path= ($path /usr/texbin /usr/local/bin)
	xelatex -output-driver="xdv2pdf" "$1"

Why use the SVN version of XeTeX? Though no new version of XeTeX has  
been officially released since TeXLive-2007, there have been many bug  
fixes and enhancements, in response to reports and requests on the  
XeTeX mailing list. Compiling the new version is as easy as having  
Xcode installed, getting the source tarball http://scripts.sil.org/svn-view/xetex/TRUNK.tar.gz 
, extracting it in say ~/Library/Donwloads, then typing in Terminal

	cd ~/Library/Downloads/TRUNK
	sh build-xetex
	sudo sh install-xetex

The instructions at http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=xetex_linux#96c5d158 
  are outdated in this respect, there is no need to compile xdvipdfmx  
separately, it's now included in the xetex compilation process.

Hope this helps,

Bruno Voisin


More information about the MacOSX-TeX mailing list