\
input{sect1}
; while this is readily soluble in the case of
human-prepared files (just don’t name them all the same),
automatically produced files have a way of having repetitious names,
and changing them is a procedure prone to error.
The import package comes to your help here: it defines an
\
import
command that accepts a full path name and the name of a
file in that directory, and arranges things to “work properly”.
So, for example, if /home/friend/results.tex contains
Graph: \includegraphics{picture} \input{explanation}
then \
import{/home/friend/}{results}
will include both
graph and explanation as one might hope. A \
subimport
command
does the same sort of thing for a subdirectory (a relative path rather
than an absolute one), and there are corresponding \
includefrom
and \
subincludefrom
commands.
\
cfpart
, \
cfchapter
, \
cfsection
and \
cfsubsection
,
each of which takes directory and file arguments, e.g.:
\cfpart[pt 1]{Part One}{part1}{part}
which command will issue a ‘normal’ command
\
part[pt 1]{Part One}
and then input the file
part1/part.tex, remembering that part1/ is now the
“current folder”. There are also commands of the form
\
cfpartstar
(which corresponds to a \
part*
command).
\
cfinput
to input something relative to the “current
folder”, or you may use \
input
, using \
cfcurrentfolder
to
provide a path to the file. (There are also
\
cfcurrentfolderfigure
for a figure/ subdirectory and
\
cfcurrentfolderlistings
for a listings/ subdirectory.)
Documentation of chapterfolder is in French, but the
README in the directory is in English.
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=docotherdir