4

I understand a number of people have asked similar questions to this but I am yet to find an answer in their questions which solves the problem I'm having.

I am trying to put an image into a pdf. I have done this plenty of times and never had any major issues.

This is some of my code:

\documentclass[a4paper]{article}
\usepackage{times}
\usepackage[margin=1in] {geometry}
\usepackage{mathptmx} 
\usepackage{amsmath, amsthm, amssymb}
\usepackage{multirow}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{graphicx}

\graphicspath { {D:\Work\Thesis\Images} }

\begin{document}
\title{Developing...}

\section{xx}

\subsection{xx}

\includegraphics[width=7.5cm]{vv1.jpg} 

\end{document}

I have checked the directory of the image clearly and the image name and both are correct. I have tried putting the image in a different document and its worked just fine.

  • 3
    Have you tried \graphicspath{D:/Work/Thesis/Images}? – Przemysław Scherwentke Jun 24 '14 at 16:04
  • 1
    When you say \include graphics in the question title, with a space, that causes me to suspect that this space could be the reason behind the error. Just a wild guess. – Masroor Jun 24 '14 at 16:05
  • Welcome to TeX.SE! Which error message(s) do you get? – Mico Jun 24 '14 at 16:06
  • @Masroor: The command \includegraphics is correctly spelled in the MWE, however. – user31729 Jun 24 '14 at 16:11
  • @ChristianHupfer Yes, I did notice that, but I was surprised why it is written that way in the subject. Again, just a wild guess. – Masroor Jun 24 '14 at 16:22
6
\graphicspath { {D:\Work\Thesis\Images} }

TeX will look for macros \Work, \Thesis, and \Images. You can use forward slashes instead (also in Windows):

\graphicspath{{D:/Work/Thesis/Images/}}

Also you need the directory separator at the end of the path, because package graphicx only puts the path before the image name.

The additional set of curly braces is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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