I'm a bit new with latex and I'm trying to create a project with a few subfiles and I found a problem that I just dont understand. I will first put you in context. My directory distribution is as follows:

|Apuntes_radio.tex  (This is the main file)
|paquetes.sty   (This is the preamble file)
|->|->Introduccion.tex (This is the subfile)
|->|->img_intro/  (And this is the folder where the images for this subfile will be)

My main file is



\title{Apuntes de Radiactividad y Aplicaciones (3º Física)}
\author{Samuel G. Guerrero}
\date{Febrero 2020}






And the subfile is a bit long, so I'll show you where latex says the problems are:


  {"temas/Introduccion/img_intro/"} %images path for the main file
  {"img_intro/"}                    %images path for THIS subfile


.....[some junk]....

\caption{Espectro electromagnético.}

.....[some junk]....

\caption{Espectro de una lámpara incandescente}

.....[some junk]....


And the preamble file is:


\usepackage[spanish, es-tabla]{babel}


\addto\captionsspanish{\renewcommand{\chaptername}{Tema}} %cambiar "capitulo" por " tema%

{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter.}{10pt}{}

Now the problem

As it is, I have no trouble compiling the subfile individualy. It shows me no errors and looks as I want it. The problem comes when I try to compile the main file (Apuntes_radio.tex), it gives me this error: enter image description here

the long one saying:

! Package pdftex.def Error: File `\es@period@code espc_EM.pdf' not found: usingdraft setting.See the pdftex.def package documentation for explanation.Type H for immediate help.... \includegraphics[scale=0.5]{espc_EM}

Can anyone tell what it is? I've sorted the 'Missing $ inserted' error before, but this time I'm pretty sure it's not a symbol missing, mainly because the subfile does compile by itself without problems! I've lost a day and a half already to this...

Thanks in advance!!

  • 1
    Welcome to TeX-SX! As a new member, it is recommended to visit the Welcome and the Tour pages to be informed about our format and also to know about Minimal Example. Otherwise, more specifically about your question: try to use \includegraphics[scale=0.5]{espc_EM.png} rather than espc_EM without extension.
    – R. N
    Feb 16, 2020 at 20:22
  • Hi Samuel, are you compiling with pdflatex or xelatex? Did you consult this question? maybe it can help you: tex.stackexchange.com/questions/473062/… Feb 16, 2020 at 20:57
  • @Annie I've seen that question, but I dont really understand it. I've checked, and i have perl but not gswin32c installed. And i dont really know what to do. About the first question, im compiling with pdflatex. Feb 16, 2020 at 21:06
  • i deepen the research: never had this problem .. give me time :) Feb 16, 2020 at 21:12
  • 1
    Try if works if you remove the quotes from the graphicspath declaration. Feb 16, 2020 at 23:16

1 Answer 1


Remove the quotes from the graphicspath declaration. Quote are unneeded as there are not spaces (and with a current latex also in the other case) and with spanish they actually harm here as spanish makes the " active.

  {temas/Introduccion/img_intro/} %images path for the main file
  {img_intro/}                    %images path for THIS subfile

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.