summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-docotherdir.html
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-docotherdir.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-docotherdir.html65
1 files changed, 65 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-docotherdir.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-docotherdir.html
new file mode 100644
index 00000000000..aa6074b7fed
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-docotherdir.html
@@ -0,0 +1,65 @@
+<head>
+<title>UK TeX FAQ -- question label docotherdir</title>
+</head><body>
+<h3>Bits of document from other directories</h3>
+<p/>A common way of constructing a large document is to break it into a
+set of files (for example, one per chapter) and to keep everything
+related to each of these subsidiary files in a subdirectory.
+<p/>Unfortunately, TeX doesn&rsquo;t have a changeable &ldquo;current directory&rdquo;,
+so that all files you refer to have to be specified relative to the
+same directory as the main file. Most people find this
+counter-intuitive.
+<p/>It may be appropriate to use the &ldquo;path extension&rdquo; technique
+
+<a href="FAQ-tempinst.html">used in temporary installations</a> to deal with
+this problem. However, if there several files with the same name in
+your document, such as <i>chapter1/fig1.eps</i> and
+<i>chapter2/fig1.eps</i>, you&rsquo;re not giving TeX any hint as to
+which you&rsquo;re referring to when in the main chapter file you say
+<code>\</code><code>input{sect1}</code>; while this is readily soluble in the case of
+human-prepared files (just don&rsquo;t name them all the same),
+automatically produced files have a way of having repetitious names,
+and changing <em>them</em> is a procedure prone to error.
+<p/>The <i>import</i> package comes to your help here: it defines an
+<code>\</code><code>import</code> command that accepts a full path name and the name of a
+file in that directory, and arranges things to &ldquo;work properly&rdquo;.
+So, for example, if <i>/home/friend/results.tex</i> contains
+<blockquote>
+<pre>
+Graph: \includegraphics{picture}
+\input{explanation}
+</pre>
+</blockquote><p>
+then <code>\</code><code>import{/home/friend/}{results}</code> will include both
+graph and explanation as one might hope. A <code>\</code><code>subimport</code> command
+does the same sort of thing for a subdirectory (a relative path rather
+than an absolute one), and there are corresponding <code>\</code><code>includefrom</code>
+and <code>\</code><code>subincludefrom</code> commands.
+<p/>The <i>chapterfolder</i> package provides commands to deal with its
+(fixed) model of file inclusion in a document. It provides commands
+<code>\</code><code>cfpart</code>, <code>\</code><code>cfchapter</code>, <code>\</code><code>cfsection</code> and <code>\</code><code>cfsubsection</code>,
+each of which takes directory and file arguments, e.g.:
+<blockquote>
+<pre>
+\cfpart[pt 1]{Part One}{part1}{part}
+</pre>
+</blockquote><p>
+which command will issue a &lsquo;normal&rsquo; command
+<code>\</code><code>part[pt 1]{Part One}</code> and then input the file
+<i>part1/part.tex</i>, remembering that <i>part1/</i> is now the
+&ldquo;current folder&rdquo;. There are also commands of the form
+<code>\</code><code>cfpartstar</code> (which corresponds to a <code>\</code><code>part*</code> command).
+<p/>Once you&rsquo;re &ldquo;in&rdquo; a <i>chapterfolder</i>-included document, you
+may use <code>\</code><code>cfinput</code> to input something relative to the &ldquo;current
+folder&rdquo;, or you may use <code>\</code><code>input</code>, using <code>\</code><code>cfcurrentfolder</code> to
+provide a path to the file. (There are also
+<code>\</code><code>cfcurrentfolderfigure</code> for a <i>figure/</i> subdirectory and
+<code>\</code><code>cfcurrentfolderlistings</code> for a <i>listings/</i> subdirectory.)
+<p/>Documentation of <i>chapterfolder</i> is in French, but the
+<i>README</i> in the directory is in English.
+<dl>
+<dt><tt><i>chapterfolder.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/chapterfolder.zip">macros/latex/contrib/chapterfolder</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/chapterfolder.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/chapterfolder/">browse</a>)
+<dt><tt><i>import.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/misc/import.sty">macros/latex/contrib/misc/import.sty</a>
+</dl>
+<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=docotherdir">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=docotherdir</a>
+</body>