TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a research paper using LaTeX.

I have certain images to insert. Now when we observe the images from the research paper, they have the following format:

    its caption

I am trying to replicate this using the following code

    \includegraphics[width=.75\linewidth]{E:/Arifah/MS/thesis/final thesis report/Component           Based Software Development.png} 
    \caption{Component Based Software Development}

However, the format that I am getting is

    the path of image

Now, how do I remove the path?

share|improve this question

migrated from stackoverflow.com Jan 5 '12 at 23:46

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, even though this question already has an accepted answer. – Werner Jan 5 '12 at 23:54
up vote 5 down vote accepted

Your filename contains spaces which LaTeX cannot handle.

Either renamce your file to not contain spaces, or if you run pdflatex try the grffile package which should make it work even with spaces.

share|improve this answer
i renamed the file n now used the following code........ \begin{figure}[h] \centering \includegraphics[width=.75\linewidth]{E:/Arifah/MS/thesis/final thesis report/ComponentBasedSoftwareDevelopment.png} \caption{Component Based Software Development} \end{figure}............ – Arifah Azhar Jan 5 '12 at 19:09
it gives the same result i.e my path is being displayed – Arifah Azhar Jan 5 '12 at 19:09
@ArifahAzhar: There's still a space in ../final thesis report/... – Benjamin Bannier Jan 5 '12 at 19:09
Removing spaces in your path isn’t a good solution – you are destroying your paths! A better solution is to use relative instead of absolute image paths. Works perfectly. Or, if those paths still contain spaces, set up a base path for your graphics using the options of the graphics package, and escape the spaces … the documentation of the package contains clues, if I remember correctly. – Konrad Rudolph Jan 5 '12 at 19:24
depending on your operating system, you might be able to define symbolic links which do not contain spaces. E.g. with Linux, ln -s PathToGraphicsDirectory MyGraphics and you could then use \graphicspath{MyGraphics} in your LaTeX file – prettygully Jan 6 '12 at 0:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.