Sophie

Sophie

distrib > Momonga > development > i686 > media > os > by-pkgid > ef1f89c4296c878b2bca761df11f0c51 > files > 30

emacs-auctex-doc-11.86-14m.mo8.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- This manual is for AUCTeX
(version 11.86 from 2010-02-21),
a sophisticated TeX environment for Emacs.

Copyright C 1992, 1993, 1994, 1995, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.  A
copy of the license is included in the section entitled "GNU Free
Documentation License."

 -->
<!-- Created on July 15, 2012 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>AUCTeX 11.86: 5.2 Multifile Documents</title>

<meta name="description" content="AUCTeX 11.86: 5.2 Multifile Documents">
<meta name="keywords" content="AUCTeX 11.86: 5.2 Multifile Documents">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Multifile"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="auctex_29.html#Modes-and-Hooks" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="auctex_31.html#Parsing-Files" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="auctex_28.html#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="auctex_28.html#Customization" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="auctex_35.html#Appendices" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="auctex.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="auctex_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="auctex_40.html#Indices" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="auctex_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Multifile-Documents"></a>
<h2 class="section">5.2 Multifile Documents</h2>
<a name="index-Multifile-Documents"></a>
<a name="index-Documents"></a>
<a name="index-Documents-with-multiple-files"></a>
<a name="index-Multiple-Files"></a>
<a name="index-Many-Files"></a>
<a name="index-Including"></a>
<a name="index-_005cinclude"></a>
<a name="index-Inputing"></a>
<a name="index-_005cinput"></a>
<a name="index-Master-file-1"></a>

<p>You may wish to spread a document over many files (as you are likely to do if
there are multiple authors, or if you have not yet discovered the power
of the outline commands (see section <a href="auctex_19.html#Outline">Outlining the Document</a>)).  This can be done by having a
&ldquo;master&rdquo; file in which you include the various files with the TeX
macro &lsquo;<samp>\input</samp>&rsquo; or the LaTeX macro &lsquo;<samp>\include</samp>&rsquo;.  These
files may also include other files themselves.  However, to format the
document you must run the commands on the top level master file.
</p>
<p>When you, for example, ask AUCTeX to run a command on the master file,
it has no way of knowing the name of the master file.  By default,
it will assume that the current file is the master file.  If you insert
the following in your &lsquo;<tt>.emacs</tt>&rsquo; file AUCTeX will use a more
advanced algorithm.
</p>
<table><tr><td>&nbsp;</td><td><pre class="lisp">(setq-default TeX-master nil) ; Query for master file.
</pre></td></tr></table>

<p>If AUCTeX finds the line indicating the end of the header in a master
file (<code>TeX-header-end</code>), it can figure out for itself that this is
a master file.  Otherwise, it will ask for the name of the master file
associated with the buffer.  To avoid asking you again, AUCTeX will
automatically insert the name of the master file as a file variable
(see <a href="../emacs/File-Variables.html#File-Variables">(emacs)File Variables</a> section &lsquo;File Variables&rsquo; in <cite>The Emacs Editor</cite>).  You can also insert
the file variable yourself, by putting the following text at the end of
your files.
<a name="index-TeX_002dheader_002dend-2"></a>
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">%%% Local Variables:
%%% TeX-master: &quot;master&quot;
%%% End:
</pre></td></tr></table>

<p>You should always set this variable to the name of the top level document.  If
you always use the same name for your top level documents, you can set
<code>TeX-master</code> in your &lsquo;<tt>.emacs</tt>&rsquo; file.
</p>
<table><tr><td>&nbsp;</td><td><pre class="lisp">(setq-default TeX-master &quot;master&quot;) ; All master files called &quot;master&quot;.
</pre></td></tr></table>

<dl>
<dt><a name="index-TeX_002dmaster-2"></a><u>User Option:</u> <b>TeX-master</b></dt>
<dd><p>The master file associated with the current buffer.  If the file being
edited is actually included from another file, then you can tell AUCTeX
the name of the master file by setting this variable.  If there are
multiple levels of nesting, specify the top level file.
</p>
<p>If this variable is <code>nil</code>, AUCTeX will query you for the
name.
</p>
<p>If the variable is <code>t</code>, then AUCTeX will assume the file is a master
file itself.
</p>
<p>If the variable is <code>shared</code>, then AUCTeX will query for the name,
but will not change the file.
</p></dd></dl>

<dl>
<dt><a name="index-TeX_002done_002dmaster"></a><u>User Option:</u> <b>TeX-one-master</b></dt>
<dd><p>Regular expression matching ordinary TeX files.
</p>
<p>You should set this variable to match the name of all files, for which
it is a good idea to append a <code>TeX-master</code> file variable entry
automatically.  When AUCTeX adds the name of the master file as a
file variable, it does not need to ask next time you edit the file.
</p>
<p>If you dislike AUCTeX automatically modifying your files, you can
set this variable to &lsquo;<samp>&quot;&lt;none&gt;&quot;</samp>&rsquo;.  By default, AUCTeX will modify
any file with an extension of &lsquo;<samp>.tex</samp>&rsquo;.
</p></dd></dl>

<dl>
<dt><a name="index-TeX_002dmaster_002dfile_002dask"></a><u>Command:</u> <b>TeX-master-file-ask</b></dt>
<dd><a name="index-C_002dc-_005f"></a>
<p>(<kbd>C-c _</kbd>) Query for the name of a master file and add the respective
File Variables (see <a href="../emacs/File-Variables.html#File-Variables">(emacs)File Variables</a> section &lsquo;File Variables&rsquo; in <cite>The Emacs Editor</cite>) to the
file for setting this variable permanently.
</p>
<p>AUCTeX will not ask for a master file when it encounters existing
files.  This function shall give you the possibility to insert the
variable manually.
</p></dd></dl>

<p>AUCTeX keeps track of macros, environments, labels, and style
files that are used in a given document.  For this to work with
multifile documents, AUCTeX has to have a place to put the
information about the files in the document.  This is done by having an
&lsquo;<tt>auto</tt>&rsquo; subdirectory placed in the directory where your document is
located.  Each time you save a file, AUCTeX will write information
about the file into the &lsquo;<tt>auto</tt>&rsquo; directory.  When you load a file,
AUCTeX will read the information in the &lsquo;<tt>auto</tt>&rsquo; directory
about the file you loaded <em>and the master file specified by
<code>TeX-master</code></em>.  Since the master file (perhaps indirectly) includes
all other files in the document, AUCTeX will get information from
all files in the document.  This means that you will get from each file,
for example, completion for all labels defined anywhere in the document.
</p>
<p>AUCTeX will create the &lsquo;<tt>auto</tt>&rsquo; directory automatically if
<code>TeX-auto-save</code> is non-nil.  Without it, the files in the document
will not know anything about each other, except for the name of the
master file.  See section <a href="auctex_33.html#Automatic-Local">Automatic Customization for a Directory</a>.
</p>
<dl>
<dt><a name="index-TeX_002dsave_002ddocument"></a><u>Command:</u> <b>TeX-save-document</b></dt>
<dd><a name="index-C_002dc-C_002dd"></a>
<p>(<kbd>C-c C-d</kbd>) Save all buffers known to belong to the current document.
</p></dd></dl>

<dl>
<dt><a name="index-TeX_002dsave_002dquery"></a><u>User Option:</u> <b>TeX-save-query</b></dt>
<dd><p>If non-nil, then query the user before saving each file with
<code>TeX-save-document</code>.
</p></dd></dl>


<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="auctex_29.html#Modes-and-Hooks" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="auctex_31.html#Parsing-Files" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="auctex_28.html#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="auctex_28.html#Customization" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="auctex_35.html#Appendices" title="Next chapter"> &gt;&gt; </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated on <i>July 15, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
 </font>
 <br>

</p>
</body>
</html>