Struggling to Include a .jpg Picture in my Report

  • Thread starter Thread starter rama1001
  • Start date Start date
  • Tags Tags
    Picture Report
Click For Summary

Homework Help Overview

The original poster is attempting to include a .jpg image in a LaTeX report and is encountering issues with the image not displaying correctly during the PDF conversion process. The problem involves the use of the \includegraphics command and the file path specified for the image.

Discussion Character

  • Exploratory, Assumption checking

Approaches and Questions Raised

  • Participants discuss the compilation method being used, suggesting the use of pdflatex. There are inquiries about the settings in TeXnicCenter and whether the file path is correctly formatted. Some participants suggest moving the image file to the same directory as the .tex file or changing the file path format.

Discussion Status

The discussion is ongoing, with participants providing various suggestions regarding file paths and compilation methods. There is no explicit consensus yet, but several potential solutions are being explored.

Contextual Notes

The original poster has been working on this issue for two days and is specifically using LaTeX to PDF conversion. There is mention of the need to check preferences related to the compilation program.

rama1001
Messages
130
Reaction score
1

Homework Statement


I want to include a .jpg picture in my report and got struck here form two days. I tried in the following way and i included all headers like graphicxs so on.

Homework Equations



\par
\begin{figure}[h]
\centering
\includegraphics[width=13cm,height=7cm]{C:\Users\Raj\Desktop\weldfig\Generalseamweldingprinciple.jpg}
\caption{Generalseamweldingprinciple}
\label{fig1.1:General spot welding principle}
\end{figure}

The Attempt at a Solution



It always displaying a blank box with name in middle as "C:.jpg"

BTW, i am doing Latex->PDF convesrtion.

Thank you.
 
Physics news on Phys.org
What are you using for compiling? You should probably use pdflatex.
 
No,

i am using TeXniCcenter. I has been irritating all the day.
 
I've never used that, but there is probably some kind of preferences window. Check from there what program you are using for compiling the .tex-file. There may even be a pdflatex-option there. Try that instead if you can find it. You can also try changing the file type to png.
 
If that's the error message you are getting, my guess is that it is having trouble locating the file (because you are using backslashes to indicate the file name, but in latex backslashes are reserved for commands). Try moving it to the same directory as the .tex file, and just putting the name of the file only, inside the braces. Or, try using forward slashes in the file location.
 
For the record, does it work to give the entire path to the file at all (with correct slashes etc.), or does the file have to be in the same folder as the .tex-file? Or does one, in the case where the file is not in the same folder, have to add the path to the folder where it is located via \addgraphicspath{..}?
 
kloptok said:
For the record, does it work to give the entire path to the file at all (with correct slashes etc.), or does the file have to be in the same folder as the .tex-file? Or does one, in the case where the file is not in the same folder, have to add the path to the folder where it is located via \addgraphicspath{..}?

I had used \includegraphics with a file in a subdirectory, i.e. by using \includegraphics{subdir/file.png}, prior to answering the question. I just now tried using an absolute directory, and I can confirm it does work if you use forward slashes.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
10K