Troubleshooting: Image Not Appearing - Tips for Inserting an Image in LATEX

  • LaTeX
  • Thread starter evinda
  • Start date
  • Tags
    Picture
In summary: Maybe try checking if the image file is actually saved in the specified folder. In summary, the conversation is about inserting an image into a LaTeX document. The person is having trouble with the image not appearing and is seeking help. The expert suggests checking if the image is in the correct folder and using a more explicit path in the \includegraphics command.
  • #1
evinda
Gold Member
MHB
3,836
0
Hello! (Wave)

I am writing something in LATEX and I want to insert an image.

I wrote at the beginning this:

[m] \usepackage{graphicx}
\graphicspath{ {shm/} } [/m]

[m]shm[/m] is the folder where I saved the picture that I want to upload and then I wrote this: [m] \item \includegraphics{ask2} [/m](I called the graph [m]ask2[/m]) but the picture doesn't appear... Have I written something wrong?
 
Physics news on Phys.org
  • #2
Four things.
1) Did you type [m]\includegraphics{ask2}[/m] in the preamble? You can't insert images in the preamble.
2) You have to put the file extension after the name. If it is a .png, then write [m]\includegraphics{ask2.png}[/m].
3) If you put the picture in the same folder as the source files, you don't need to specify the graphics path.
4) Why do you have the picture bulleted (the [m]\item[/m] command bullets lists, as I'm sure you know)?
 
  • #3
jacobi said:
Four things.
1) Did you type [m]\includegraphics{ask2}[/m] in the preamble? You can't insert images in the preamble.
2) You have to put the file extension after the name. If it is a .png, then write [m]\includegraphics{ask2.png}[/m].
3) If you put the picture in the same folder as the source files, you don't need to specify the graphics path.
4) Why do you have the picture bulleted (the [m]\item[/m] command bullets lists, as I'm sure you know)?

I have to write exersices in LATEX and at the second exercise I have to add a picture.

At the beiginning I wrote this:\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english,greek]{babel}
\usepackage{amsmath}
\usepackage{graphicx}
\graphicspath{ {shm/} }and then:\begin{document}.....\includegraphics{ask2.jpg}....\end{document}

But I got the warning message:

[m]

Package pdftex.def Error: File `ask2.jpg' not found. File `ask2.jpg' not found on imput line 81.[/m]
What can I change?
 
  • #4
It looks right. I don't exactly know what the problem is. All I can suggest is that you put a more explicit path to the image in the [m]\includegraphics[/m] command (i.e. [m] \includegraphics{c: \folder\folder2\...\shm\ask2.jpg}[/m]) and remove the [m]\graphicspath[/m] command in the preamble. Maybe that will help.
Other than that, I'm not exactly sure why it isn't working.
 

FAQ: Troubleshooting: Image Not Appearing - Tips for Inserting an Image in LATEX

What is LATEX?

LATEX is a typesetting software commonly used in the scientific community for creating documents with complex formatting, such as research papers, reports, and presentations.

Why is my image not appearing in LATEX?

There could be several reasons why your image is not appearing in LATEX. Some common causes include incorrect file path, incorrect file format, and missing packages. It is important to double-check these factors before troubleshooting further.

How do I insert an image in LATEX?

To insert an image in LATEX, you first need to include the graphicx package in the preamble of your document. Then, use the \includegraphics command to insert the image at the desired location. Make sure to specify the correct file path and format.

Why is my image appearing distorted in LATEX?

If your image appears distorted in LATEX, it could be due to incorrect scaling or resolution. To fix this, you can use the optional arguments in the \includegraphics command to specify the desired width, height, or scale of the image.

How can I troubleshoot other image-related issues in LATEX?

If you are still facing issues with your image in LATEX, it is best to consult the documentation or seek help from online forums and communities. You can also try clearing the cache, recompiling the document, or using a different image file to see if the issue persists.

Similar threads

Replies
5
Views
2K
Replies
3
Views
452
Replies
2
Views
3K
Replies
2
Views
753
Replies
2
Views
2K
Replies
2
Views
5K
Replies
2
Views
5K
Replies
7
Views
3K
Replies
1
Views
7K
Back
Top