Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problems inserting graphics (gif,tif,bmp) with pdfLaTeX

2,927 views
Skip to first unread message

Giovanni

unread,
Nov 28, 2000, 3:00:00 AM11/28/00
to
Hi,
I have problems inserting images with pdfLaTeX, which I really do not
understand. I've tried all of gif, tif and bmp formats and always get
the same error message. I understand that pdfLaTeX can't use bitmap
files, but the same problem occur with the other formats. on the other
hand, LaTeX works fine only with the bmp format.

I use the following syntax:

\documentclass{article}
\usepackage{graphicx}

\DeclareGraphicsRule{.bmp}{bmp}{}{}
\DeclareGraphicsRule{.tif}{tif}{}{}
\DeclareGraphicsRule{.gif}{gif}{}{}

\begin{document}
%\includegraphics[width=1in,height=.5in]{logoubs.bmp}
\includegraphics[width=1in,height=.5in]{emu.gif}
%\includegraphics[width=1in,height=.5in]{1_euro.tif}
\end{document}

With LaTeX, I get the following error message:

! LaTeX Error: Can not include graphics of type: gif.

While all graphics formats give me the following error with pdfLaTeX:

! Package graphics Error: Division by 0.

See the graphics package documentation for explanation.
Type H <return> for immediate help.
...

l.11 ...cs[width=1in,height=.5in]{emu.gif}


Am I missing something?

Sorry if this is a FAQ. I use MikTeX for windows.
BTW, are there any gif or tif to EPS converters for windows?
It could save me some trouble.

Thanks a lot in advance,
Giovanni

Robin Fairbairns

unread,
Nov 28, 2000, 3:00:00 AM11/28/00
to
Giovanni <fe...@uni2a.unige.ch> wrote:
>I have problems inserting images with pdfLaTeX, which I really do not
>understand. I've tried all of gif, tif and bmp formats and always get
>the same error message. I understand that pdfLaTeX can't use bitmap
>files, but the same problem occur with the other formats. on the other
>hand, LaTeX works fine only with the bmp format.
>
>I use the following syntax:
>
>\documentclass{article}
>\usepackage{graphicx}
>
>\DeclareGraphicsRule{.bmp}{bmp}{}{}
>\DeclareGraphicsRule{.tif}{tif}{}{}
>\DeclareGraphicsRule{.gif}{gif}{}{}

these are irrelevant: \usepackage[pdftex]{graphicx} defines the
necessary rules

>\begin{document}
>%\includegraphics[width=1in,height=.5in]{logoubs.bmp}
>\includegraphics[width=1in,height=.5in]{emu.gif}
>%\includegraphics[width=1in,height=.5in]{1_euro.tif}
>\end{document}
>
>With LaTeX, I get the following error message:
>
>! LaTeX Error: Can not include graphics of type: gif.

pdftex can cope with bitmap graphics in .jpg (lossy), .tif and .png
formats.

(it can natively deal with vector graphics in .pdf, and can (with the
help of hans hagen's macros) also deal with metapost output).

i expect gif format was left out because it's (a) not as good as
either tiff or png, and (b) subject to patent restrictions. patent
restrictions in the usa are things that a lowly research student in
the czech republic (however good he may be) is unlikely to be able to
contest, however stupid the uspo's original decision may have been.
--
Robin Fairbairns, Cambridge

Emili Tortosa-Ausina

unread,
Nov 28, 2000, 3:00:00 AM11/28/00
to

Giovanni <fe...@uni2a.unige.ch> escribió en el mensaje de noticias
3a238ae4...@news.unige.ch...
> Hi,

> I have problems inserting images with pdfLaTeX, which I really do not
> understand. I've tried all of gif, tif and bmp formats and always get
> the same error message. I understand that pdfLaTeX can't use bitmap
> files, but the same problem occur with the other formats. on the other
> hand, LaTeX works fine only with the bmp format.
>
> I use the following syntax:
>
> \documentclass{article}
> \usepackage{graphicx}
>
> \DeclareGraphicsRule{.bmp}{bmp}{}{}
> \DeclareGraphicsRule{.tif}{tif}{}{}
> \DeclareGraphicsRule{.gif}{gif}{}{}
>
> \begin{document}
> %\includegraphics[width=1in,height=.5in]{logoubs.bmp}
> \includegraphics[width=1in,height=.5in]{emu.gif}
> %\includegraphics[width=1in,height=.5in]{1_euro.tif}
> \end{document}
>
> With LaTeX, I get the following error message:
>
> ! LaTeX Error: Can not include graphics of type: gif.
>
> While all graphics formats give me the following error with pdfLaTeX:
>
> ! Package graphics Error: Division by 0.
>
> See the graphics package documentation for explanation.
> Type H <return> for immediate help.
> ...
>
> l.11 ...cs[width=1in,height=.5in]{emu.gif}
>
>
> Am I missing something?
>
> Sorry if this is a FAQ. I use MikTeX for windows.
> BTW, are there any gif or tif to EPS converters for windows?
> It could save me some trouble.
>
> Thanks a lot in advance,
> Giovanni
>
>

Maybe I miss the true meaning of your question. When you pdfLaTeX, all
figures must be *.pdf. Otherwise, pdf conversion performs o.k., but figures
will be missing.

I think ghostview allows the conversion, although it is not very nice.
Acrobat Distiller makes a better job, but you must pay for it.

H.T.H.

Emili

Sven Bovin

unread,
Nov 29, 2000, 2:42:52 AM11/29/00
to
Emili Tortosa-Ausina wrote:
>
> Giovanni <fe...@uni2a.unige.ch> escribió en el mensaje de noticias
> 3a238ae4...@news.unige.ch...

[snip, pdfTeX not accepting graphics file formats]



> Maybe I miss the true meaning of your question. When you pdfLaTeX,
> all figures must be *.pdf. Otherwise, pdf conversion performs o.k.,
> but figures will be missing.

pdfTeX also accepts png graphics.

For vector graphics, I usually produce an eps (since I mostly
use normal TeX) and if necessary, I convert it with epstopdf
from the Ghostscript distribution (but that's under *nix,
don't know if that route works under Windows). For bitmapped
graphics in pdfTeX I would use png. If you're working under
Windows, chances are most programmes can export your graphics
to png (and more and more programmes can even export to pdf).

> I think ghostview allows the conversion, although it is not very nice.
> Acrobat Distiller makes a better job, but you must pay for it.

HTH

Sven

--
-----------------------------------------------------------
sven dot bovin at chem dot kuleuven dot ac dot be
-----------------------------------------------------------

0 new messages