6

I am trying to insert an image with the graphicx package using LuaLaTeX. I receive an error that the file cannot be found. I get this whether I use the \graphicspath argument or include the complete path in \includegraphics. After reading all similar discussions I could find, I have arrived at this code:

    \documentclass[12pt]{article}
    \usepackage{graphicx}
    \graphicspath{{Figures/}}
    \usepackage{fontspec}
    \setmainfont{Century Gothic}

    \begin{document}
    \begin{figure}
    \centering
    \includegraphics{ACTB Normalized.png}
    \end{figure}
    \end{document}

The error I receive is:

LaTeX Warning: File `ACTB Normalized.png' not found on input line 10.

! Package luatex.def Error: File `ACTB Normalized.png' not found: using draft setting.

See the luatex.def package documentation for explanation. Type H for immediate help. ...

l.10 \includegraphics{ACTB Normalized.png}

I have also tried other image file formats including .jpg, .pdf, and .eps. Any insights on this issue would be greatly appreciated. Thank you!

2
  • 5
    Did you saved the file in folder named "Figures" ? Also try to avoid spaces in name of files... It is bad practice.
    – koleygr
    Jun 19, 2017 at 16:52
  • 1
    Welcome to TeX.SX! Try adding \usepackage{grffile}
    – egreg
    Jun 19, 2017 at 17:03

2 Answers 2

6

Turned out to be a very simple solution. Apparently it didn't like the space in the filename of my graphic. Removing spaces or using grffile package solves the problem. Thank you for your comments!

2

Do not use accented characters or space in the file path

1
  • 1
    Welcome to TeX.SX! This is more a comment rather than an answer. Could you please elaborate on why using accented characters in file paths is bad given the example of the OP?
    – TeXnician
    May 19, 2018 at 7:13

You must log in to answer this question.

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