Graphics, Figures & TablesMissing Figures when generating PDF

Information and discussion about graphics, figures & tables in LaTeX documents.
galofek
Posts: 9
Joined: Fri May 15, 2009 10:32 am

Missing Figures when generating PDF

Post by galofek »

Hi,

I have a problem I hope the global Latex community can help:
I'm using the TeXnicCenter editor to generate the PDF, but the figures are missing.. :oops:
I tried differnet configuration (.tco) files, but with no real luck.
I'm using the \psfig{....eps} command.

Any idea?

Thanks!
Gal

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Missing Figures when generating PDF

Post by localghost »

You should use the commands provided by the graphicx package since the epsfig package is obsolete and only a wrapper.

If the problem persists, check the DVI and PS file. If necessary, build a minimal working example (MWE) and attach a concerned file to your next post.


Best regards and welcome to the board
Thorsten
galofek
Posts: 9
Joined: Fri May 15, 2009 10:32 am

Re: Missing Figures when generating PDF

Post by galofek »

Thanks, Thorsten!
I'll buy another tip: Which command to use exactly instead of the \psfig would you recommend? :?:

Appreciate your help!
Gal
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Missing Figures when generating PDF

Post by Stefan Kottwitz »

Hi Gal,

Thorsten has already mentioned the recommendable package graphicx and has given a link to it.

The command your are probably looking for is \includegraphics. Have a look at the explanation and its options in the graphicx package documentation.

Stefan
LaTeX.org admin
galofek
Posts: 9
Joined: Fri May 15, 2009 10:32 am

Re: Missing Figures when generating PDF

Post by galofek »

Need the help again...
I used the includegraphics command instead of the psfig but got the same results:
The figures are missing from the PDF, but when I generate the DVI file, I do see them.
Another strange thing though, is that when I sent the DVI file to my instructor, he couldn't see the figures too...

What the *** is going on here...?? :cry:
Any suggestions for next steps?

Appreciate your help.

Thanks,
Gal
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Missing Figures when generating PDF

Post by localghost »

I have a certain assumption. At first compile your document via DVI to PS and check the resulting output. If the figures are still missing, tell us in detail whether you give relative or absolute paths to your included graphics files. Clarify this with some code in the sense of a minimal working example (MWE) if necessary.

The fact that your instructor can't see the figures in the DVI file has a very simple explanation. The external graphics are only linked to the document but not embedded. You would have to add all the external files with the same directory structure to make them appear in the DVI output.
galofek
Posts: 9
Joined: Fri May 15, 2009 10:32 am

Missing Figures when generating PDF

Post by galofek »

localghost wrote:At first compile your document via DVI to PS
You mean to use the "Latex => PS" profile?
Somehow, I'm able to compile it but can't really view the ps file (something is broken in my GSview, I guess).
I use absolute paths in my figures. I tried changing that and removed the full path, but again, the figure was missing from the PDF.
Why are the figures missing from the PDF? Adding all the external files won't help for the PDF, right?

Let me know what you think.
I will try to add an example, if we come to a dead end...

Thanks!
Gal
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Missing Figures when generating PDF

Post by localghost »

galofek wrote:[...] You mean to use the "Latex => PS" profile? [...]
Primarily yes, but the profile "LaTeX => PS => PDF" also will do. The important thing is to have a PS file.
galofek wrote:[...] I use absolute paths in my figures. I tried changing that and removed the full path, but again, the figure was missing from the PDF. [...]
My assumption seemed to be right. In recent versions of dvips there is a security switch which prevents external graphics with absolute paths from being included. I usually put graphics into a subdirectory of my project (relative path). But if you insist on using absolute paths, you can set the -R0 switch.

Code: Select all

dvips -R0 filename.dvi
I suggest to modify all your TeXnicCenter (TXC) build profiles with dvips involved. Start TXC and press Alt+F7. Modify all concerned build profiles by adding the switch mentioned above and keep all other command line options.
galofek
Posts: 9
Joined: Fri May 15, 2009 10:32 am

Re: Missing Figures when generating PDF

Post by galofek »

Houston, some more problems...
I tried going back to basic: I created a simple .tex file with one figure. The "Latex => DVI" looks like is working fine. The figure is seen ok when I open the DVI file using the YAP.
But...
I tried generating a PS file ("Latex => PS"). The file seems to be generated but when I open it with the GSview I get:
"
GSview 4.9 2007-11-18
Unknown in Comments section at line 8:
%%DocumentFonts: Times-Roman Times-Bold
Failed to load C:\Program Files\gs\gs8.63\bin\gsdll32.dll, error 126
‏‏המודול שצוין לא נמצא.
Failed to load C:\Program Files\Ghostgum\gsview\gsdll32.dll, error 126
‏‏המודול שצוין לא נמצא.
Failed to load gsdll32.dll, error 126
‏‏המודול שצוין לא נמצא.
Can't load Ghostscript DLL
"
... and file won't open.

Not sure if you can read the Hebrew fonts above :) but it says something like:"The specified module could not be found".
One thing I did see in the compilation is this Warning:"Package pdfcolmk Warning: Nothing to fix, because 'pdftex.def' not loaded". I get the same thing when I use the "Latex => DVI" so I assume it's ok (or at least not the root cause of my problem...)

When I tried "Latex => PDF" I do get a pdf file, but the figure is missing again :cry: I did not use a absolute path..
The "Latex => PS => PDF" doesn't create a pdf file.

In the text file, I use the IEEEtran documentclass.
Here is how I call the figure:
\begin{figure}[htbp]
\centerline{\includegraphics[width=9cm,height=8cm]{fig6_rbf.eps}}
\vspace{-0.5cm}
\caption{\small{Architecture.}}
\label{rbf}
\end{figure}

Well.. Sorry for the long post, but I tried to give all the details... It's almost 1:30 am now so it's bed time...

Please help.....................!

Thanks!
Gal
User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

Missing Figures when generating PDF

Post by T3. »

galofek wrote:Failed to load C:\Program Files\gs\gs8.63\bin\gsdll32.dll, error 126
‏‏המודול שצוין לא נמצא.
Failed to load C:\Program Files\Ghostgum\gsview\gsdll32.dll, error 126
‏‏המודול שצוין לא נמצא.
Failed to load gsdll32.dll, error 126
‏‏המודול שצוין לא נמצא.
Can't load Ghostscript DLL
Do you have Ghostscript (mind you, not Ghostview) installed and set up properly? If yes, where? And which version?

Cheers,

Tomek
Post Reply