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
?
Best Answer
When you use the
import
package (which provides the\import
command), you must use slashes/
in your path.E.g.
Also, be sure that you put
/
at the end of the path.