hpekristiansen answer from Using \import correctly There are three ways to put subfile.tex file into main.tex:
\include{⟨filename⟩}
\input{⟨filename⟩}
\import{⟨path⟩}{⟨filename⟩}
It is clear that
\include
is only used in themain.tex
and\include
can not be used insubfile.tex
\input
can be used inmain.tex
orsubfile.tex
\import
needs\usepackage{import}
.
Now I'm confused about using \import
. When this should be used?
What is the use of \subimport
?
The point is that there is no example in the manual for import
. I have different files in different folders. How to use \import
with giving the path of subfile.tex
?
Should I use \input
for importing TikZ pictures using a standalone file subfile.tex
?
\import
(absolute paths) or\subimport
(relative paths) if you want to nest imports, and want the imported file (first level) to use its own path as the base for further imports (second level). If your TikZ picture doesn't make further imports, you don't need to use\import
. I've recently posted an example, let me know whether or not it's sufficiently clear (there's room for improvement, I guess).