[Tex/LaTex] How to use relative paths

importincludeinputpathssharelatex

I want to add a table from a separate tex file to my document. I get an error saying the file vr_sets.tex is not found, when I do this in Chapter2/chapter2.tex:

\input{tab/vr_sets}

This also fails:

\input{./tab/vr_sets}

This works:

\input{Chapter2/tab/vr_sets}

But how can I avoid having to specify the full path each time I want to include content (e.g. tables, sections, figures) from another tex file in a sub directory of the "current working directory"? Is there no such thing as relative paths in tex?

In my main.text I have:

\include{Chapter2/chapter2}

Best Answer

I was able to solve my problem. I changed this:

\include{Chapter2/chapter2}

To this:

\usepackage{import}
\import{Chapter2/}{chapter2.tex}

And I was then able to do inputs with relative paths.