LyXCannot compile PDF with graphics missing, but DVI is fine

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
nuke
Posts: 6
Joined: Tue Jul 14, 2009 4:01 pm

Cannot compile PDF with graphics missing, but DVI is fine

Post by nuke »

I have a doc where I want to hide my graphics for the moment. So I moved my eps-files in a folder called 'hide'. In this case compilation of DVI works fine, however, when I try to make PDF directly by pressing GUI button it fails with the following message:

Code: Select all

Latex Error: Cannot determine size of graphic in mygraph.eps (no size specified... 
...0 0 200 100, draft, type=eps]{swing.eps}
                                                  
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.
(it is showed for all missing graphics)

I can use DVI to PDF converter all the time :| , but of course direct compilation is preferable.

Do you have an idea how to solve it?
Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Cannot compile PDF with graphics missing, but DVI is fine

Post by gmedina »

Hi,

I don't understand completely your problem, and without some code it's hard to provide effective help. However, you could try loading the graphicx package with the demo option, as in

Code: Select all

\usepackage[demo]{graphicx}
With this package option, your images will be replaced by a 150pt by 100pt rectangle.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Cannot compile PDF with graphics missing, but DVI is fine

Post by frabjous »

pdf(la)tex compilation typically can't handle .eps files at all. Use epstopdf or similar to convert the eps files to pdf, and then include them.
nuke
Posts: 6
Joined: Tue Jul 14, 2009 4:01 pm

Re: Cannot compile PDF with graphics missing, but DVI is fine

Post by nuke »

Thanks for your reply, guys!
I need to explain the case in more details.

1. I write my doc in LyX editor. The doc has a number of graphics in eps format.

2. I can compile my doc to both DVI and PDF with my eps graphics. Works perfectly.

3. Some graphics are quite complex, so their processing slows down performance. That's why I hide them during normal work on the doc. To do that I move them to another folder. When I compile the doc to DVI (pressing GUI button 'DVI'), LyX puts a draft block instead of missing graphic -- just a square with file name inside. Exactly what I need -- it works fast, and I can include only graphics I need to see now.

4. I decided to send a new version of the doc to my boss. I have already done it before with graphics, so there is no need to add them now. I press 'PDF' button -- the failure. I press 'DVI' button -- works fine. So I have to go to menu File->Export->PDF(dvipdfm) to get pdf-file.

Obviously, GUI 'PDF' operation doesn't work correctly when graphics is missing (i.e. with graphics I have intentionally hidden for higher performance).

Do people involved in LyX development read this forum? If not, then I guess nobody will fix it.
Post Reply