I have written one customized beamer template (it consists of multiple files). I pushed it on github and now I want to use it as a git submodule in another git project.

The beamer template works fine if the .tex file and all the .sty files are in the same directory, but if I use it in a submodule not, because the compiler (pdflatex) does not find the sty files. This is the tree of the directory:

enter image description here

In particular the beamercolorthemepadua.sty file includes the other ones with the following latex code:


The main.tex file includes the beamer template with the following latex instructions:


Now if I compile the main.tex file from the root directory of the project, that includes the beamertemplate in the subdirecotry the compiler (pdflatex and latexmk) does not succeed because:

enter image description here

That makes sense because the files are not in the same directory in which the compiler works.

How can I say to LaTeX that it should search in the subdirectories?

I tried also to modify the TEXINPUTS variables, but without success. Any hint would be appreciated.

  • What did you try for TEXINPUTS? Jul 21, 2018 at 11:36
  • Thank you for replying. I re-tried now with the following export TEXINPUTS=.:$PWD/YAUBT:$TEXINPUTS and it works, but now I cannot import the images. LaTeX Warning: File ./img/big_logo.png' not found on input line 94.`
    – Briomkez
    Jul 21, 2018 at 12:27
  • Try TEXINPUTS=.:$PWD/YAUBT//:$TEXINPUTS (you might have to replace ./img/big_logo.png with big_logo.png in your theme) Jul 21, 2018 at 12:29

1 Answer 1


If you use


instead of


it will not only search the YAUBT directory, but also its sub-directories, e.g. img, and thus be able to find your images.

You must log in to answer this question.

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