Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Images in Latex

  1. Jan 23, 2006 #1


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I've got an image, GIF, JPEG or other ( I can easily convert between most formats) and I want to insert it into a Latex document. Could someone please give me instructions on how to use this. I'm using TeXnicCenter on a Windows system.
  2. jcsd
  3. Jan 23, 2006 #2
    You have to convert them to postscript format to use them (at least, I only know how to include postscript images).
    Code (Text):
    at the top of your document. You can then insert the images using something like
    Code (Text):
    The rotatebox statement is because i tend to wide up with sideways postscript files, its argument is what angle to rotate by.
  4. Jan 23, 2006 #3
    If you use PDFLaTeX, JPEG files can be included as described by franz.

    For regular LaTeX you're stuck with using something like jpeg2ps to convert your JPEG files to encapsulated PS format.
  5. Jan 23, 2006 #4
    I think you need an extra package to do that with pdflatex. Something in place of the \usepackage{graphicx}. I think.
  6. Jan 23, 2006 #5
    An extra package is not nessesary (atleast not with .jpg files). The following minimal example compiles fine with pdfLaTeX, under MiKTeX.
    Code (Text):

    \includegraphics{stone} % stone.jpg <--!!
  7. Jan 23, 2006 #6

    Hmm, interesting, i just got it working. Took a bit of finagling (kept telling me it couldn't find the file when it was right there). Good to know.
  8. Jan 24, 2006 #7


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Thanks for your help guys, just to check the image needs to be in the same folder as the LaTex document? Apologies for double posting on the boards.
  9. Jan 24, 2006 #8
    Yes. You'll typically want to have all the file related to a given document in the same folder together. Or symlinks to the relevant files (often more convenient if you want to use files from many different sources that are organized according to some other criteria) if you're on a *nix system.
  10. Jan 24, 2006 #9
    I think you can usee adobe's acrobat reader to change your word document into a pdf file, that is much faster, you can include everything everything in word document.
  11. Jan 24, 2006 #10
    There are good reasons to keep your graphics in your working directory, see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=graphicspath but it can surely be done:
    Code (Text):

    \graphicspath{{../}}    % looks for graphic files in the parent directory
    \graphicspath{{./figs/}} % looks for graphic files in the sub directory "figs"
    and so on.
  12. Jan 24, 2006 #11


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Thank's for your help everyone.
  13. Jan 24, 2006 #12
    You need Adobe Acrobat to do that. Acrobat Reader doesn't give you that capability.

    Besides, Word documents just don't look nearly as pretty as a TeX/LaTeX document does :)
  14. Jan 24, 2006 #13

    Wow, you don't know how to use latex do you? Latex is far easier and faster to use than any word processor, especially when you need to include dozens of equations and images quickly. You never even have to take your hands off the keyboard. Further, Latex documents look more professional.
  15. Jan 24, 2006 #14


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I used to use MS Word with equation editor, I've recently switched to Latex and found it much more intuitive once you've learned the code.
  16. Jan 25, 2006 #15

    The thing with Latex is that it is harder to LEARN. It is much easier to actually USE, once you have learned it.
  17. Oct 22, 2006 #16
    Hi! I'm new on using Latex and in this forum too, I've read what you said about inserting imatges and it has been very helpful, I got the .pdf using a .jpg image!!!

    However, the dvi visor doesn't work, and I tried doing it with an '.eps' image... it doesn't seem to understand the code (something about the bounding box)...
    Can anyone help me getting the two things correctly? thanks a lot!
  18. May 8, 2010 #17
    hi guys
    please could any one tell me how can I include two images (parallel) or next to each other in latex and how can I manage the caption.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Images in Latex
  1. LaTeX Image Question (Replies: 1)

  2. Images in LaTeX (Replies: 5)