Short question: Can I embed a TIFF file *directly* in a LaTeX document
using \includegraphics?
Longer version: While The LaTeX Graphics Companion tantalizingly states
on p 29 that ``the system also copes with files of type TIFF, PIX, PICT
and so on (of course appropriate drivers must be available for each
case)'', it is uncharacteristically silent when it comes to providing an
example of how to go about doing this.
At present I convert TIFF images to eps (using tiff2ps or xv) and use
the graphics package with dvips option and \includegraphics to embed
.eps files in my LaTeX document.
Is there a way to embed the TIFF directly directly within the LaTeX
document?
From the Graphics Companion (pp 29--41) I thought something like:
****
\usepackage[dvips,final]{graphics}
\DeclareGraphicsExtensions{.tiff}
\DeclareGraphicsRule{.tiff}{tiff}{.tiff}{tiff2ps -e}
...
\includegraphics[width height]{file_name}
...
****
would work, but it does not.
I get the error message:
! LaTeX Error: Can not include graphics of type: tiff
My installation is Red Hat Linux with tetex-0.9-6 bundled as standard.
Thank you in advance.
--Chandra
20 Jun 99
------------------
Dr R Chandrasekhar
Centre for Intelligent Information Processing Systems
Department of Electrical & Electronic Engineering
The University of Western Australia, Nedlands, WA 6907, AUSTRALIA
Phone: +61-8-9380-7989 email: cha...@ee.uwa.edu.au
Fax: +61-8-9380-1168
\usepackage[dvips,final]{graphics}
\DeclareGraphicsExtensions{.tiff}
\DeclareGraphicsRule{.tiff}{eps}{.tiff.bb}{tiff2ps -e}
...
\includegraphics[width height]{file_name}
Please note that you should generate the .tiff.bb file containing the
BoundingBox comment
tiff2ps -e file.tiff | grep BoundingBox > file.tiff.ps
Cheers
Pier Giorgio
\DeclareGraphicsRule{.tif}{eps}{.tif.bb}{`tiff2ps -e #1}
No, and Yes
>\DeclareGraphicsRule{.tiff}{tiff}{.tiff}{tiff2ps -e}
>I get the error message:
>! LaTeX Error: Can not include graphics of type: tiff
You need to do several things to include a tiff file. You need to tell
LaTeX how big the file is, because tiff files have no BoundingBox.
if you have tiffinfo then this command will print a bounding box.
tiffinfo foo.tiff | \
awk '/Image Width/ {printf "%%%%BoundingBox: 0 0 %d %d\n", $3, $6}'
You can do this in other ways, but you do need to get the bounding box.
Put the output of this in a file foo.tiff.bb
Now use the graphics rule
\DeclareGraphicsRule{.tiff}{eps}{.tiff.bb}{`tiff2ps -e #1}
(ie .tiff files will be loaded like eps, the .tiff.bb file will be
searched for a bounding box and dvips will convert to postscript with
the tiff2ps program.) Note that the second argument is eps, not tiff,
and the open quote before tiff2ps.
Then the line
\includegraphics{crater.tiff}
should work. If you don't like thousands of tiff.bb files you can use
the bb = ll lr ul ur option of \includegraphics.
Unless disk space is critical it's probably easier just to convert to
eps.
James
> Short question: Can I embed a TIFF file *directly* in a LaTeX document
> using \includegraphics?
>
> Longer version: While The LaTeX Graphics Companion tantalizingly states
> on p 29 that ``the system also copes with files of type TIFF, PIX, PICT
> and so on (of course appropriate drivers must be available for each
> case)'', it is uncharacteristically silent when it comes to providing an
> example of how to go about doing this.
>
> At present I convert TIFF images to eps (using tiff2ps or xv) and use
> the graphics package with dvips option and \includegraphics to embed
> .eps files in my LaTeX document.
>
> Is there a way to embed the TIFF directly directly within the LaTeX
> document?
This is entirely a function of your drivers for screen and printing.
Most do not support TIFF --- some do :-)
http://www.micropress-inc.com/linux
This is TeX->PDF rather than (the obsolete) TeX->DVI
On Sun, 20 Jun 1999 14:59:40 -0400, Louis Vosloo <sup...@YandY.com>
wrote: