Troubleshooting Image Display in LaTeX

  • Context: LaTeX 
  • Thread starter Thread starter Rectifier
  • Start date Start date
  • Tags Tags
    Images Latex
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
5 replies · 3K views
Rectifier
Gold Member
Messages
313
Reaction score
4
Hey!

I can't 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:
\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:
on Phys.org
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.
 
  • Like
Likes   Reactions: 1 person
There is no such thing as a "graphics" environment. If you want a floating figure, try instead
Code:
\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:
  • Like
Likes   Reactions: 1 person
DrClaude said:
If you figure resides in the same directory as the LaTeX file, do explicitly include a folder name, just the name of the file.

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:
\includegraphics[width=0.7\textwidth]{test.jpg}
 
  • Like
Likes   Reactions: 1 person
Will try that out when I am home thank you all.
 
phyzguy said:
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."
Thanks for spotting that!