Graphics, Figures & TablesFigures show as blank boxes with filename in it

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
fuzzyspot
Posts: 2
Joined: Mon Mar 28, 2011 3:38 am

Figures show as blank boxes with filename in it

Post by fuzzyspot »

Hi all,
Sorry if this has been asked somewhere else... I tried for quit a while but still couldn't the solution.

So I am trying to include several EPS figures created by Illustrator CS3 into a Tex file in TeXicCenter. Here's my code:

Code: Select all

\documentclass[
preprint
]{jasatex}   % jasatex.cls obtained from the journal website
\usepackage{graphicx}
...
\begin{figure}
\includegraphics[type=eps,ext=.eps,read=.eps]{fig_1}
\caption{A figure caption. The figure captions are automatically numbered.}
\label{fig:fig1}
\end{figure}
I added the [type=eps,ext=.eps,read=.eps] part because the program didn't recognize .eps before and was giving me errors.

Now I can pass without errors and warnings, but have Bad Box(es) reported, and the figures are shown as blank boxes with the figure filename in the middle of it... I am not sure what went wrong. Could anyone help me on this?

Thanks so much!

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Figures show as blank boxes with filename in it

Post by localghost »

Please always provide a minimal example that is compilable as provided. Otherwise giving specific help is nearly impossible especially when a problem becomes more complicated.

You are using a document class that is not listed on CTAN. And unfortunately you didn't give a link where to find it. So I can only assume that the »preprint« class option is the culprit. Probably it's an equivalent to the known »draft« option of other classes.


Best regards and welcome to the board
Thorsten
fuzzyspot
Posts: 2
Joined: Mon Mar 28, 2011 3:38 am

Figures show as blank boxes with filename in it

Post by fuzzyspot »

Hello again,

Sorry that I forgot to post the link to JasaTex. Please see it in the following link:
ftp://ftp.aip.org/asa/

I have also made a minimum example. Please see the attachment for the tex and figure files.

Also, if it is really the preprint part that causes the problem, how do I fix it?

Thanks very much!
Attachments
fig_2.eps
figure file 2
(195 Bytes) Downloaded 292 times
fig_1.eps
figure file 1
(192 Bytes) Downloaded 290 times
fig_prob_samp.tex
TEX file
(4.39 KiB) Downloaded 312 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Figures show as blank boxes with filename in it

Post by localghost »

The provided example compiles just fine even with the »preprint« option. Figures are shown as their are. Did you take a look at the single EPS files before compiling? If not, do so. For comparison try to include an image where you know the content.
asunius
Posts: 1
Joined: Fri Apr 01, 2011 10:41 am

Figures show as blank boxes with filename in it

Post by asunius »

Hey
I have just started with LaTeX, and I am facing same problem.
My code is

Code: Select all

\documentclass [a4paper,draft,11pt,] {report}
usepackage{graphicx}
.....
\begin{figure}
 \centering
 \includegraphics [width=0.48\textwidth] {disp_curve.eps}
 \end{figure}
In the compiled document there is a box with ''disp_curve_converted-to.pdf'' written.
there is pdf document created separately in same directory having the actual figure.

I would appreciate the help.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Figures show as blank boxes with filename in it

Post by localghost »

asunius wrote:[…] I have just started with LaTeX, and I am facing same problem.[…]
Just drop »draft« in the document class options. And please check your examples not only for minimal content but also for functionality.


Best regards and welcome to the board
Thorsten
Post Reply