How can I insert an image in a LaTeX document?

  • Context: LaTeX 
  • Thread starter Thread starter sara_87
  • Start date Start date
  • Tags Tags
    Latex Picture
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
10 replies · 2K views
sara_87
Messages
748
Reaction score
0

Homework Statement



I have a picture in the pictures folder, saved as pic.gif and i want to put this into my latex text, how do i do this?

Homework Equations





The Attempt at a Solution



To be honest i have no idea.
 
Physics news on Phys.org
Try something like this:

\usepackage{graphicx}

\begin{center}
\includegraphics[width=2.5in,height=2.5in]{mypicture.gif}
\end{center}

I know this works if the picture is in the directory with your tex file. You can try it with a path in the filename.
 
but it's not in the directory with the tex file, how do i put it in the same directory?

thank you
 
sara_87 said:
but it's not in the directory with the tex file, how do i put it in the same directory?

thank you

To make sure I'm not misunderstanding what you are asking, you are talking about a tex document and a picture you have your own computer at home, right? At least, that's what I assume. Can't you just copy or move your gif file to the directory where you keep your tex files? Or don't I understand what you are trying to do?
 
you are understanding what I am trying to do but because I am a beginner with latex, i don't know how to do basic things.
how do i move my gif picture into the directory where i keep my tex files?
 
Moving a file has nothing to do with Latex. It depends on your computer. If you have windows you can simply "drag and drop" the file from one folder to another. Or right click on the file and copy/paste it to the new directory. For apple or unix I can't help you.
 
What operating system are you using? Moving files around is an OS kind of thing, unrelated to latex. If you're using Windows, you can do file operations using Windows Explorer. Navigate to the directory with you gif file, copy it, navigate to the directory with your tex files, and paste your gif file.
 
this might be a stupid thing to say...but i don't know where my tex files are

:O
 
i fixed it... :)

thak you.
I move the pictures to the tex files directory.