[Tex/LaTex] Import file from another folder

external filesfoldersimport

Hi I need to import a file.tex (I cannot move it from this folder) file from a different folder of the main file.

is it possible? how i should do?

Best Answer

First, use \usepackage{import}. Then, use \import{Path}{File.tex}. Inside the first braces, use the file path, eg. /Folder/OtherFolder/.../PackageFolder/. In the second one, put the file name(including extensions like .tex).

For example, if the file's relative path is /Parts/Project/file.tex, this is the MWE you would use.

\documentclass{...}
...
\usepackage{import}
...
\begin{document}
    ...
    \import{/Parts/Project/}{file.tex}
    ...
\end{document}

Note: I'm not sure if you use file extension. Try experimenting!

Related Question