0

I'm trying to insert images using the graphicx package. However, when I compile the code, it comes up with an error:

! LaTeX Error: Cannot determine the size of graphic in C:/Users/cst2/Pictures/MathsC.png (no BoundingBox).

My file directory is as follows:

\graphicspath{ {C:/Users/cst2/Pictures/} }

and the call function is as follows:

\includegraphics{MathsC.png}

can anyone tell me what could be causing this error?

Many thanks.

Xylius
  • 222
  • I don't think this issue is related to TeXnicCenter, you may consider to remove this tag from this question. – Damien Dtx Mar 29 '16 at 08:19
  • Use slashes instead of backslashes in the path C:/Users/cst2/Pictures – Ulrike Fischer Mar 29 '16 at 08:19
  • I also thought that was the issue, however, when I changed it to slashes, it would not recognise the file directory at all, I suspect it may be because I am using a Windows system – Xylius Mar 29 '16 at 08:21
  • @UlrikeFischer isn't a / require at the end (ie. C:/Users/cst2/Pictures/) ? – Damien Dtx Mar 29 '16 at 08:58
  • @DamienDtx: Yes, but as in the question there is a slash there I hope Xylius didn't forgot it. – Ulrike Fischer Mar 29 '16 at 09:03
  • @Xylius: Slashes works fine on windows. I don't know why it doesn't find the pictures but: 1. spaces in files names are bad and 2. absolute pathes are bad. – Ulrike Fischer Mar 29 '16 at 09:05
  • @UlrikeFischer: I have since tried and changed the format to slashes instead of backslashes yet nothing has changed, however, following your advice, ill leave them as slashes – Xylius Mar 29 '16 at 09:22
  • path in error message and graphicspath seem to be mismatched. are you sure you're using the right path? – naphaneal Mar 29 '16 at 13:26
  • 4
    @Xylius: The error refers to boundingbox, which suggests this answer: http://tex.stackexchange.com/questions/17734/cannot-determine-size-of-graphic – Ross Mar 31 '16 at 12:13

0 Answers0