Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LaTex using TexnicCenter

  1. Jan 29, 2006 #1
    hi there, I am writing a report on texnicCenter that uses Latex.

    I have a picture drawn on the computer and i need to be able to insert the picture into my document using latex as a figure. If anyone knows the commands for such a thing i would be gratefull if you coul tell me thank you very much

  2. jcsd
  3. Jan 29, 2006 #2
    google for "put figure in latex document"
  4. Jan 29, 2006 #3
    ive done so and tried the following commands however it doesn't seem to work

    \includegraphics[height=60mm]{C:\Documents and Settings\Owen Booler\My Documents\My Pictures\potstep.jpg}
    \caption{Diagram showing the tunneling in the step potential problem}

    My file that i want to insert is located in C:\Documents and Settings\Owen Booler\My Documents\My Pictures\potstep.jpg

    Whats going wrong?

    Thanks for any help
  5. Jan 30, 2006 #4
    Did you remember to use the graphix package in your preamble before you begin the document?
  6. Jan 30, 2006 #5
    1. you did not type the filelocation correctly.
    2. LaTeX does not (i belive) like spaces in the path. atleast i cannot include a pictures located in 'E:/Documents/My Pictures/' but i can include one that is placed in 'E:/Documents/'

    The following works fine with MikTeX and pdflatex

    Code (Text):

    \includegraphics{E:/Documents/stone} % stone.jpg <--!!
    If you have all your pictures located in the same folder the following could perhaps come in handy:
    Code (Text):

    \includegraphics{stone} % stone.jpg <--!!
    Last edited: Jan 30, 2006
  7. Jan 30, 2006 #6
    Its best to keep all files related to a given document in the same folder, this prevents problems with a given LaTeX distribution. You might try using "My Pictures" (include the double quotes in the path name).
  8. Jan 30, 2006 #7
    thanks for you help so far, however I have tried to do what you said and it still won't work. What is the graphicx is it a programme that I should have?

    this is what I have done;

    \caption{Diagram showing the wavefunction $\psi\left(x\right)_{1}$ in the left region and $\psi\left(x\right)_{2}$ in the right}

    thanks for any help

  9. Jan 30, 2006 #8
    I do not know how you do it in TexnicCenter (why not use emacs/aucTeX? :D) somewhere you should be able to tell TexnicCenter what packages you wish to use. graphicx is one such package and is nessesary for includeing graphics. I am sure you have that package installed but you need to add it to your document. The way I showeded it \usepackage{graphicx} was called *before* the actually document started. You need to do something similar in TexnicCenter, it does *not* work to include it inside a figure enviroment.
  10. Jan 30, 2006 #9
    that would work fine as long as potstep.jpg is at the root folder of your C: drive. The easiest and probably best thing is to do what franz and triss said and keep your graphics files in the same folder (or a subfolder) as your LaTeX/TeX file. That way all the includegraphics line need to say is
    Code (Text):
    Code (Text):
    if you put it in a subfolder.
  11. Jan 30, 2006 #10
    It will only work if \usepackage{graphicx} is called in the preamble, latex is not *that* smart :wink:
  12. Jan 30, 2006 #11
    right, yeah, good catch. i totally missed that :blushing:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for LaTex using TexnicCenter Date
LaTeX How to use LaTeX on Physics Forums Feb 1, 2017
LaTeX What are the macros you guys use to speed up LaTeX-ing? Sep 10, 2016
LaTeX Changing the order of references using bibtex to sequential Mar 8, 2016
LaTeX How to use Latex on this site Jul 31, 2015
LaTeX Latex Beginner using TeXWorks Dec 2, 2014