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

Cannot determine size of graphic

1,671 views
Skip to first unread message

Mark Thompson

unread,
Apr 3, 2003, 12:26:19 AM4/3/03
to
I'm using MikTex in TexnicCenter. I was having problems with my floats -
'Too many unprocessed floats!"

Following a suggestion I've since installed the float package. However,
latex cannot determine the size of the graphic. Each figure is inserted like
so:

Stefan Spreng

unread,
Apr 3, 2003, 6:40:03 AM4/3/03
to
"Mark Thompson" <mdth...@ucalgary.ca> wrote in message news:<b6gjss$l6i$1...@nserve1.acs.ucalgary.ca>...

You get the error "latex cannot determine the size of the graphic" if
the format of the graphics file is invalid. Note that LaTeX can only
handle eps files. If you want to include jpg or png files, use either
pdfLaTeX or convert them to eps. I understand that there are problems
with funny eps formats created by Win-Software. I seem to remember
that this issue was discussed before on this NG.

Stefan

Mark Thompson

unread,
Apr 3, 2003, 7:10:03 AM4/3/03
to
It turns out that I was using pdflatex, which is why the jpg images were not
giving me problems to begin with. However, I converted all my images to an
eps format - but they don't look as good as the tif, or jpg format.
Furthermore, I cannot get the eps format to work with adobe. I'm still
getting errors, and my bibliography isn't showing up. It seems like I'm
running around in circles. This is very unfortunate because I would much
rather be working on writing my thesis than having to try and debug this.

Mark


Lars Madsen

unread,
Apr 3, 2003, 9:22:25 AM4/3/03
to


how did you convert the jpgs to eps? I hear that jpeg2eps (or is it
jps2ps is the best tool for this)

--

/daleif (remove RTFSIGNATURE from email address)

Some URLs:
http://www.tex.ac.uk/faq
http://www.ams.org/tex/short-math-guide.html
http://people.ee.ethz.ch/~oetiker/lshort/lshort.pdf
http://www.ctan.org/tex-archive/info/epslatex.pdf

Dan Luecking

unread,
Apr 3, 2003, 1:30:13 PM4/3/03
to
On 3 Apr 2003 03:40:03 -0800, sp...@gmx.de (Stefan Spreng) wrote:

>"Mark Thompson" <mdth...@ucalgary.ca> wrote in message news:<b6gjss$l6i$1...@nserve1.acs.ucalgary.ca>...

> Note that LaTeX can only
>handle eps files.

Please read grfguide to see why this oft-repeated sentence is false.
LaTeX can handle any graphics format. What is true are:

"LaTeX needs the bounding box, and only for eps files can it obtain
that information from the file itself." and "Ordinary dvips can
only handle eps files."

For other graphics formats you need only supply a bounding box (perhaps
with an explicit option to \includegraphics, perhaps with a separate
file containing the bounding box info and a graphics rule to instruct
LaTeX to read that file. Plus, of course, you need a dvi driver program
that can handle the format. For years I used to include a variety of
bitmap graphics formats in LaTeX, viewing and printing the results
with MiKTeX's YAP driver. Even dvips, in recent versions of some TeX
systems, has been linked to a library to handle a variety of bitmap
formats.


Dan

--
Dan Luecking Department of Mathematical Sciences
University of Arkansas Fayetteville, Arkansas 72701

Mark Thompson

unread,
Apr 3, 2003, 11:14:32 AM4/3/03
to
Sorry if my last message was a little incoherent. I've been awake for three
days now - just got three hours sleep. I'm trying to get this chapter into
my supervisor today. Unfortunately, I have done very little writing and
more time messing around with getting latex to compile the document. I
should mention once again that I'm using TexnicCenter - which has the option
of pdflatex. This is why my jpg and tif figures didn't give me problems
previously. I wasted 1.5 hours converting my figures and have now
discovered that it was probably wasn't required. Furthermore, pdflatex
doesn't see the eps figures, so I have to convert them back.

I'm at a loss here for what has gone wrong. I was using the Chicago
citation package - my supervisor didn't like the formating style and wanted
me to use harvard instead. Elsevier science offers what appeared to be a
good bib package that is used in conjunction with natbib and puts the
citations in harvard format. I started using this package, and things were
working well. However, once I started putting my big figures into my
thesis, and then the citations turned into '?', the bibliography disapeared,
and the pdf document was said to be corrupt unless I recompiled the document
after I shut everything down.

I realize this is a bit of a rant - but I'm missing a deadline and spent
very little time writing and more time trying to debug the program that is
suppossed to help me out. I'm at a real loss at what to do. I've lost my
thesis - because I can't see it any more, and I'm meeting my supervisor
today and he expects this chapter to be ready.

Is there a simple solution to fix this problem? I'm not sure why this has to
be complicated. I simply want to use the natbib package - because my
citations are now structured in this format. I also want to keep my figures
in jpg and tif format - I spent a long time making sure they looked good, I
don't want to mess them up. Finaly, I want to put a figure in my document
with a figure caption and I want to do the same with my tables. Why does
this have to be such a chore? What am I missing?

Mark


Patrick TJ McPhee

unread,
Apr 3, 2003, 2:11:54 PM4/3/03
to
In article <b6hpt5$jge$1...@nserve1.acs.ucalgary.ca>,
Mark Thompson <mdth...@ucalgary.ca> wrote:

% Is there a simple solution to fix this problem? I'm not sure why this has to
% be complicated. I simply want to use the natbib package - because my

I suppose it's because you're dealing with several problems at once, see
them as being interrelated, and you don't have or haven't read the
appropriate documentation.

The bib format has nothing to do with the graphics formats.

You should not have to convert your graphics `back', since you should
still have the original files. You just want to use them again.

What you need to do to get around the graphics size issue is to create a file
called x.bb for each x.jpg. This should have the contents

%%BoundingBox: 0 0 x y

where 0 0 is the lower-left corner of the image, and x y is the upper-
right corner, in points. Just yesterday or the day before I gave a
formula for converting from pixels to points with one driver, or you
could try experimenting.

In your includegraphics line, don't put the file extension. e.g., put
x instead of x.jpg.

If you're having trouble putting captions on figures, you really need
to read at least an introduction to LaTeX.
--

Patrick TJ McPhee
East York Canada
pt...@interlog.com

Una Smith

unread,
Apr 3, 2003, 5:21:27 PM4/3/03
to
Mark Thompson <mdth...@ucalgary.ca> wrote:
>> Is there a simple solution to fix this problem? I'm not sure
>> why this has to be complicated.

You are inexperienced and under a lot of pressure. Tying your
shoelaces may now be overly complex too.


Patrick TJ McPhee <pt...@interlog.com> wrote:
>I suppose it's because you're dealing with several problems at once, see
>them as being interrelated, and you don't have or haven't read the
>appropriate documentation.
>
>The bib format has nothing to do with the graphics formats.

I suspect the problem is Mark's document isn't running cleanly
through LaTeX now, due to problems with his images. When this
happens, the .aux file may be clobbered, and when this happens
natbib does produce citations like (?). This is normal, not a
sign of disaster! So, Mark: don't panic. Once you get the
graphics figured out, your citations and bibliography will go
back to normal too.

Una Smith

Los Alamos National Laboratory, MS K-710, Los Alamos, NM 87545

0 new messages