I'm starting a Modular Latex project for the first time and I'm having problems with adding figures. I'm using the \input{} command to add files to the main documento.tex as in the Latex/Modular Documents Wiki, but when I compile, there's this error message

! LaTeX Error: File `img/imgfuv2018Din1' not found.

I already tried to use the subfiles package and follow this, this and this suggestions, but neither of them worked

My project structure is like this


The documento.tex is






and fuv2018_din_1.tex is

example text

Even when I put the \includegraphics command in the documento.tex or when I put the imgfuv2018Din1 file in the same directory it gives me the same error.

I use TexLive version 6.2.1. What am I doing wrong?

EDIT: the estilo.sty is a custom style file and I followed wiki's suggestion and is the following:

  • The tex file inside the tex directory is trying to find the image file in a img directory within the tex directory, which of course doesn't exist (at least, that's my diagnostic). I hope that made sense. You could put your tex files in the same root directory as the main tex file. Or put the img directory (as a test) inside the tex directory
    – phollox
    Aug 13, 2018 at 1:12
  • And welcome to tex.sx!
    – phollox
    Aug 13, 2018 at 1:14
  • ..img/ is a strange path. I assume you mean ../img/. But it should work without that line. I'm not familiar with estilo. Is it a custom style file? I would not recommend that for a first project. Regardless, does estilo have its own \usepackage{graphicx}?
    – Teepeemm
    Aug 13, 2018 at 2:10
  • which extension do your graphics have? And how are you compiling? With pdflatex? Aug 13, 2018 at 7:03
  • Hi. I tried putting the img folder inside the tex folder, putting the fuv2018_din_1.tex and images on the same folder as the main documento.tex, changing the path to ../img/, and also putting the packages directly on the main file, but it still returns the same error. The graphics are PNG files and I'm compiling with PDFLaTeX, using Texmaker (also tried to compile in the terminal, but it's the same).
    – gmolnar
    Aug 14, 2018 at 0:31


You must log in to answer this question.

Browse other questions tagged .