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.) Moreover, I was presented with a dialog box asking me if I wanted to overwrite BadUG.pdf -- which suggests that the LyX code is exporting the filename "BadUG.pdf", not "BadUG.png", which really makes me wonder why LaTeX is choking on BadUG.png when I try to preview from within LyX; you'd think that the code that is exported to a .tex file would be identical to the code that is handed to pdflatex when you preview.

Ideas appreciated. My workaround of exporting to pdflatex is less than ideal, as I have to invoke it via the menus every time I want to preview a change in my LyX document (instead of just clicking a handy button -- poor me! :-). I've got a LyX bug report filled out and ready to go but thought I'd get some feedback from the list first.

Chris Menzel

Reply via email to