0

I load the package with:

\usepackage{graphicx}

I use it as follows:

\includegraphics{inc/2 aanbod/inc/doc/Vormingplus/inc/img/2 jpg/p. 04-05.jpg}

This is the error I get:


LaTeX Warning: File `inc/2 aanbod/inc/doc/Vormingplus/inc/img/2 jpg/p. 04-05.jp
g' not found on input line 444.


! LaTeX Error: Unknown graphics extension: . 04-05.jpg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.444 ...c/Vormingplus/inc/img/2 jpg/p. 04-05.jpg}

? 

I think the solution for this problem is clear. graphicx should start seeking at the END of the specified filename, seek to the left for the FIRST APPERANCE OF A DOT.

Could this please be solved?

4
  • 1
    This is long-standing documented behaviour, although it is likely that we (the LaTeX team) will revisit this area soon.
    – Joseph Wright
    Jan 6, 2018 at 19:20
  • 1
    That is not a bug, it is documented behaviour. Jan 6, 2018 at 19:49
  • Also see: How to include graphics with spaces in their path?
    – Werner
    Jan 6, 2018 at 19:59
  • 1
    It was a design decision: so that .eps.z would be detected and handled (a major consideration at the time) also currently you can omit the extension in \includegraphics and the file extension will be defaulted, but if you allow abc.x.jpg then use \includegraphics{abc.x} you can no longer tell immediately that the extension has been omitted and you have to always try all the extensions even on files that apparently have an extension. certainly in 1994 that would have taken more macro space than we had space for and more time than users would want to wait. Jan 6, 2018 at 20:11

1 Answer 1

3

use

\usepackage{grffile}
[...}
\includegraphics{"inc/2 aanbod/inc/doc/Vormingplus/inc/img/2 jpg/p. 04-05.jpg"}

TeX doesn't like spaces in the file name

2
  • spaces are NOT the problem. Jan 6, 2018 at 19:21
  • also not like two dots in path/image name. this confuse it for image extension.
    – Zarko
    Jan 6, 2018 at 19:29

Not the answer you're looking for? Browse other questions tagged .