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

Tags:
  1. May 11, 2014 #1

    Rectifier

    User Avatar
    Gold Member

    Hey!

    I cant get my images to appear in ##LaTeX## :(
    Could you please help me out?

    I have read that you can use \includegraphics but when I add it in my code nothing happens.

    Code (Text):
    \documentclass[a4paper,11pt]{article}
    \usepackage[swedish]{babel}
    \usepackage{graphicx}

    \begin{document}

    \begin{graphics}
    \includegraphics[width=0.7\textwidth]{folder/test.jpg}
    \end{graphics}

    \end{document}
    Where image is in the same folder as the LaTeX file.

    What am I doing wrong?
     
    Last edited: May 11, 2014
  2. jcsd
  3. May 12, 2014 #2

    Borek

    User Avatar

    Staff: Mentor

    There are many threads on the problem, they are listed below as related discussions - see if comments in these threads don't help.

    AFAIR in most cases it is a problem of correctly assigning directories, but I know next to nothing about LaTeX.
     
  4. May 12, 2014 #3

    DrClaude

    User Avatar

    Staff: Mentor

    There is no such thing as a "graphics" environment. If you want a floating figure, try instead
    Code (Text):

    \begin{figure}
    ...
    \end{figure}
     
    Otherwise, you can simply put the \includegraphics by itself.

    If you figure resides in the same directory as the LaTeX file, don't explicitly include a folder name, just the name of the file.
     
    Last edited: May 12, 2014
  5. May 12, 2014 #4

    phyzguy

    User Avatar
    Science Advisor

    I think Dr Claude means, "If your figure resides in the same directory as the LaTeX file, don't explicitly include a folder name, just the name of the file."

    In other words, if the file test.jpg is in the same folder as the latex file, the includegraphics line should read:

    Code (Text):

    \includegraphics[width=0.7\textwidth]{test.jpg}
     
     
  6. May 12, 2014 #5

    Rectifier

    User Avatar
    Gold Member

    Will try that out when I am home thank you all.
     
  7. May 12, 2014 #6

    DrClaude

    User Avatar

    Staff: Mentor

    Thanks for spotting that!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




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

  2. LaTeX Image Question (Replies: 1)

Loading...