GeneralGraphics help please - brand new LaTex user!

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
newlou
Posts: 7
Joined: Tue Feb 19, 2008 10:49 pm

Graphics help please - brand new LaTex user!

Post by newlou »

Hi there,

I have just started using TeXnicCenter in windows xp. I have done a pretty little diagram for my thesis in paint that I have saved as a jpeg and would now like to insert into my document. I am using graphicx and have finally got it to work using the following commands and compiling as pdf.
\begin{figure}[h]
\centering
\includegraphics{c:/Documents and Settings/Lisa/Desktop/ma50176/picr.jpg}
\caption{diagram of simplified dialyser model}
\end{figure}

The picture comes out fine apart from 2 (fairly major) problems:
1) "and Settings/Lisa/Desktop/ma50176/picr.jpg" spookily appears just above it
2) the caption is miles away from the picture, leaving a gap of about half a page

I'm sure I am doing something really daft, :) but any help would be massively appreciated. I tried lots of ways to insert the picture, even saving as a .eps file (which worked for other figures but not this particular one which is why I saved it as a jpg in the end.) I also tried saving the jpg in my main directory with my tex file and just calling up the file name, which I hoped would solve problem 1) but this didn't work either, i.e the picture didn't even insert at all!

Thanks in advance,

Lisa

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Graphics help please - brand new LaTex user!

Post by localghost »

newlou wrote:[…] 1) "and Settings/Lisa/Desktop/ma50176/picr.jpg" spookily appears just above it […]
Avoid blank spaces in the path and the name of the file. Note that you need to compile with pdflatex when using JPG files.
newlou wrote:[…] 2) the caption is miles away from the picture, leaving a gap of about half a page […]
Your graphics file might be bigger than you think. You may have to reduce it to the pure contents.


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Graphics help please - brand new LaTex user!

Post by gmedina »

Avoid blank spaces in the path and the name of the file. Well, localghost has already given a more complete answer.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
newlou
Posts: 7
Joined: Tue Feb 19, 2008 10:49 pm

Re: Graphics help please - brand new LaTex user!

Post by newlou »

That's great thank you, I've managed to get it working now. Getting there slowly!
Post Reply