Graphics, Figures & TablesFile Name instead of Figure

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
moh-thabit
Posts: 12
Joined: Wed Mar 13, 2013 3:16 pm

File Name instead of Figure

Post by moh-thabit »

When I import my figure, the name of figure showed in figure itself. The concerned code is this.

Code: Select all

\begin{figure}[!ht]
  \centering
  \includegraphics[scale=0.5]{overflow1.jpg}
  \caption{Principle of overflow.}
  \label{fig:overflow}
\end{figure}
The figure appear with "overflow1.jpg" inside the figure. How can I just left with the figure without the name inside.
Last edited by localghost on Sat Apr 27, 2013 8:07 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: File Name instead of Figure

Post by sommerfee »

Drop the option "draft".
moh-thabit
Posts: 12
Joined: Wed Mar 13, 2013 3:16 pm

File Name instead of Figure

Post by moh-thabit »

sommerfee wrote:Drop the option "draft".
I am new in latex, excuse me what do you mean by "draft"
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

File Name instead of Figure

Post by Johannes_B »

In your first codeline (\documentclass[options]{something}), there might be the word draft in the option list, it could also be in the line where you are loading graphicx.

Furthermore, you should delete the file name suffix, meaning "overflow" instead of "overflow.jpg".

Additionally, you should always post a compilable minimal example, this way, you could have found the reason yourself.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
moh-thabit
Posts: 12
Joined: Wed Mar 13, 2013 3:16 pm

File Name instead of Figure

Post by moh-thabit »

Johannes_B wrote:In your first codeline (\documentclass[options]{something}), there might be the word draft in the option list, it could also be in the line where you are loading graphicx.

Furthermore, you should delete the file name suffix, meaning "overflow" instead of "overflow.jpg".

Additionally, you should always post a compilable minimal example, this way, you could have found the reason yourself.
Dear Mr.Johannes_B,

I checked if there a word "draft" somewhere I found nothing and I did what you told me by deleting the suffix but the figure doesn't appear.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: File Name instead of Figure

Post by Stefan Kottwitz »

Perhaps post your document preamble here. It would be even better if you would look at the link which Johannes provided.

Stefan
LaTeX.org admin
moh-thabit
Posts: 12
Joined: Wed Mar 13, 2013 3:16 pm

File Name instead of Figure

Post by moh-thabit »

Thank alot for help. This my latex simple document including class and packages:

Code: Select all

\documentclass[11pt]{article}
\title{Over flow on steams}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{float}
\usepackage[switch, modulo]{lineno} % line numbering
\floatstyle{boxed}
\restylefloat{figure}
\usepackage{amsmath} % use for math-centering
%\usepackage[colorinlistoftodos]{todonotes}
\doublespacing

\begin{document}
\begin{figure}[!ht]
  \centering
  \includegraphics[scale=0.5]{overflow1.jpg}
  \caption{Principle of overflow.}
  \label{fig:overflow}
\end{figure}
\end{document}
Last edited by cgnieder on Thu May 02, 2013 9:03 am, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: File Name instead of Figure

Post by Johannes_B »

I replaced your jpg with my testbild.jpg and your code works fine for me.
Maybe you could upload your pdf (compiled from the above example), so we can verify the problem.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
moh-thabit
Posts: 12
Joined: Wed Mar 13, 2013 3:16 pm

File Name instead of Figure

Post by moh-thabit »

Johannes_B wrote:I replaced your jpg with my testbild.jpg and your code works fine for me.
Maybe you could upload your pdf (compiled from the above example), so we can verify the problem.
Thank you a lot for all of you. My problem is solved by just change the name of the figure which I downloaded from internet by my own name.

Thanks again :)
Post Reply