On Apr 26, 2009, at 1:17 PM, Christopher Menzel wrote:
I'm not *completely* sure that this is a bug, but...
I inserted a perfectly ordinary PDF graphic called
"BadUG.pdf" (generated by OmniGraffle) into a LyX document. The
first time I tried to preview the document after doing so I got the
not unfamiliar "Cannot determine size of graphic" LaTeX error. Oddly
(?), the error window reported that LaTeX was choking on a file
called "BadUG.png" that LyX had created, rather than BadUG.pdf.
(I'm guessing that BadUG.png is generated because that is the format
that LyX uses to display graphics in its own editing windows.)
Adding bounding box info and specifying a scale for the graphic did
not solve the problem. Inadvertently, I found a workaround when I
decided to have a gander at the LaTeX code that LyX was generating.
Upon exporting my LyX document to a .tex file (via File -> Export),
the Skim preview of my document automatically updated and, lo and
behold, there was BadUG.pdf, placed just where I wanted it in the
document. (Great, but WHY? I only asked for the .tex code, not
that pdflatex *compile* it.)
I was mistaken here. The file updated when I exported to PDF, not
when I exported to a LaTeX file. (Doh!)
I have discovered the problem -- actually, Rich's suggestion is what
got me thinking. I went to the LaTeX log and, buried in the output,
found the message:
Class FoilTeX Warning: Option 'dvips' is ignored when running
pdflatex
I'm using FoilTeX to prepare slides for a lecture and hadn't noticed
that, when I chose the FoilTeX package, it automatically set the class
option "dvips". The log output message notwithstanding, that option
was apparently not *entirely* ignored -- its presence was preventing
my BadUG.pdf graphic from displaying. When I removed it and clicked
on the PDF preview button, the graphic showed up right where it should
be. (I'm guessing that the problem was that the dvips option,
although ignored by pdflatex, was making the graphicx package look for
an EPS file when it saw the \includegraphics{BadUG} command in the
LaTeX code.)
Anyway, problem solved. Thanks for listening. Can someone get me the
past two hours back, please?? :-)
-chris