1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Latex doubt

  1. May 7, 2012 #1
    1. The problem statement, all variables and given/known data
    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.

    2. Relevant 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}

    3. 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.
     
  2. jcsd
  3. May 7, 2012 #2
    What are you using for compiling? You should probably use pdflatex.
     
  4. May 7, 2012 #3
    No,

    i am using TeXniCcenter. I has been irritating all the day.
     
  5. May 7, 2012 #4
    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.
     
  6. May 7, 2012 #5
    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.
     
  7. May 7, 2012 #6
    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{..}?
     
  8. May 7, 2012 #7
    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Latex doubt
  1. Latex help (Replies: 2)

Loading...