Hi. I am a beginner of Latex. I have a simple question yet very urgent. Now I am trying to include a jpeg graphic using texniccenter. The enviroment is \usepackage{graphicx}. I use the following command:
\begin{figure}[h]
\centering
\includegraphics[width=1.00\textwidth]{C:/Program Files/texpic/1.jpg}
\end{figure}
The problem is: when the .tex file is converted to PDF, 'Files/texpic/1.jpg' appears above the graphic in my PDF file. How can I remove this???
I would appreciate your quick reply as I have to submit my work soon.
Thank you
Boong
General ⇒ Need urgent help!: how to remove filename when including gra
-
- Posts: 4
- Joined: Sun Apr 29, 2007 10:46 am
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
Re: Need urgent help!: how to remove filename when including gra
No blank spaces in the graphics path! Place the graphics files in a subdirectory of your source code (e. g. "gfx").
The next time you should avoid vocabulary like "urgent", because that is completely futile regarding the problem.
The next time you should avoid vocabulary like "urgent", because that is completely futile regarding the problem.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 4
- Joined: Sun Apr 29, 2007 10:46 am
Re: Need urgent help!: how to remove filename when including gra
Thans for your advise, localghost. But I still don't understand what you mean by "Place the graphics files in a subdirectory of your source code (e. g. "gfx")". Can you explain me once again?
Thanks.
Thanks.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Need urgent help!: how to remove filename when including gra
Normally, you have a directory for your project (a thesis or something else), because (pdf)latex generates some more files than only the output. This may serve as an example.
In the first directory you put the source (.tex) files of the document you are writing. (pdf)latex will generate some important auxiliary files (.aux, .log, …). The second directory (subdirectory of the first one) is the place where you put your graphics files. Taking your example, the code for including a graphics file is the following.
You can omit the ending of the file, because pdflatex will find the right file on its own. With this there will be no more path strings in your output. And you have all your files related to a project together in one directory.
Code: Select all
D:\Projects\Thesis
D:\Projects\Thesis\gfx
Code: Select all
\begin{figure}[!ht]
\centering
\includegraphics[width=\textwidth]{gfx/1}
\caption{Picture No. 1}\label{fig:picno1}
\end{figure}
Last edited by localghost on Sun Apr 29, 2007 2:05 pm, edited 1 time in total.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 4
- Joined: Sun Apr 29, 2007 10:46 am
Re: Need urgent help!: how to remove filename when including gra
Thanks a lot! I will try!
By the way I am now in Germany too. i live in Freiburg.
Schoene Sonntag
By the way I am now in Germany too. i live in Freiburg.
Schoene Sonntag
-
- Posts: 4
- Joined: Sun Apr 29, 2007 10:46 am
Re: Need urgent help!: how to remove filename when including gra
I already tried and it works!
Danke schoen.
Danke schoen.