<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>9 Multiple file LaTeX projects</title><link rel="stylesheet" type="text/css" href="../latex-suite.css"></link><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"></meta><link rel="home" href="index.html" title="Latex-Suite Reference"></link><link rel="up" href="index.html" title="Latex-Suite Reference"></link><link rel="prev" href="editing-folding.html" title="8.3 Editing the folding.vim file directly"></link><link rel="next" href="latex-project-settings.html" title="9.1 Latex-Suite project settings"></link></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">9 Multiple file LaTeX projects</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="editing-folding.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="latex-project-settings.html">Next</a></td></tr></table><hr></hr></div><div class="section" title="9 Multiple file LaTeX projects"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="latex-project"></a>9 Multiple file LaTeX projects</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="latex-project-settings.html">9.1 Latex-Suite project settings</a></span></dt><dt><span class="section"><a href="latex-master-file.html">9.2 Specifying which file to compile</a></span></dt></dl></div><a id="latex-project-example"></a><p> Many LaTeX projects contain multiple source files which are <code class="literal">\include</code>d from a master file. A typical example of this situation is a directory layout such as the following </p><p> </p><pre class="programlisting">thesis/ main.tex abstract.tex intro/ intro.tex figures/ fig1.eps fig2.eps chapter1/ chap1.tex figures/ fig1.eps conclusion/ conclusion.tex figures/</pre><p> </p><p> In the above case, <code class="literal">main.tex</code> will typically look like </p><p> </p><pre class="programlisting">% file: main.tex \documentclass{report} \begin{document} \input{abstract.tex} \input{intro/intro.tex} \input{chapter1/chap1.tex} \input{conclusion/conclusion.tex} \end{document}</pre><p> </p><p> <a id="latex-master-file-specification"></a> In such situations, you will need to convey to Latex-Suite that <code class="literal">main.tex</code> is the main file which <code class="literal">\input</code>s the other files. This is done by creating an empty file called <code class="literal">main.tex.latexmain</code> in the same directory in which <code class="literal">main.tex</code> resides. This file is called the <span class="emphasis"><em>master file</em></span> in this manual. See <a class="link" href="latex-master-file.html#Tex_MainFileExpression">Tex_MainFileExpression</a> for an alternative way of specifying the master file. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> Here <code class="literal">main.tex.latexmain</code> is (obviously) a different file from <code class="literal">main.tex</code> itself. <code class="literal">main.tex</code> need not be renamed. This ofcourse restricts each directory to have a single master file. </p></div><p> Each time Latex-Suite opens a new LaTeX file, it will try to see if it is part of a multiple file project by searching upwards (to the root of the file-system) from the current file's directory to see if it finds a file of the form <code class="literal">*.latexmain</code>. If such a file is found, then it is considered that the current file is part of a larger project. The name of the LaTeX master file is inferred directly from the first part of the <code class="literal">*.latexmain</code> file as described in the example above. </p></div><div class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="editing-folding.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="latex-project-settings.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">8.3 Editing the folding.vim file directly </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 9.1 Latex-Suite project settings</td></tr></table></div></body></html>