This is auctex.info, produced by makeinfo version 4.6 from auctex.texi.

INFO-DIR-SECTION Emacs
INFO-DIR-SECTION TeX
START-INFO-DIR-ENTRY
* AUCTeX: (auctex).     A much enhanced TeX/LaTeX mode for Emacs.
END-INFO-DIR-ENTRY


File: auctex.info,  Node: Top,  Next: Copying,  Up: (dir)

AUCTeX
******

   AUCTeX is an integrated environment for editing LaTeX and TeX files.

   This file documents AUCTeX version 11.55.

   Although AUCTeX contains a large number of features, there are no
reasons to despair.  You can continue to write TeX and LaTeX documents
the way you are used to, and only start using the multiple features in
small steps.  AUCTeX is not monolithic, each feature described in this
manual is useful by itself, but together they provide an environment
where you will make very few LaTeX errors, and makes it easy to find
the errors that may slip through anyway.

   If you want to make AUCTeX aware of style files and multi-file
documents right away, insert the following in your `.emacs' file.

     (setq TeX-auto-save t)
     (setq TeX-parse-self t)
     (setq-default TeX-master nil)

   NOTE: This documentation is preliminary.  It should however cover
most important points.  Corrections or perhaps rewrites of sections are
VERY WELCOME.

   Kresten Krab Thorup (6.0)
Per Abrahamsen (updates to 11.13)
David Kastrup (updates from 11.14)

   There is a mailing list for discussion about AUCTeX and announcement
of alpha releases, write to `auc-tex-request@sunsite.dk' to join it.
Send contributions to `auc-tex@sunsite.dk'.

   Bug reports, suggestions for new features, and pleas for help should
go to either `auc-tex_mgr@sunsite.dk' (the AUCTeX managers), or to
`auc-tex@sunsite.dk' (the mailing list) if they might have general
interest.  Please use the command `M-x TeX-submit-bug-report RET' to
report bugs if possible.

* Menu:

* Copying::                     Copying
* Introduction::                Introduction to AUCTeX
* Installation::                Installing AUCTeX
* Quick Start::                 Quick Start
* Frequently Used Commands::    Inserting Frequently Used Commands
* Advanced Features::           Advanced Editing Features
* Display::                     Controlling the Display of Source Code
* Running TeX and friends::     Starting processors, viewers and other programs
* Multifile::                   Multifile Documents
* Parsing Files::               Automatic Parsing of TeX files
* I18n::                        Internationalization
* Automatic::                   Automatic Customization
* Style Files::                 Writing Your own Style Support
* Changes::                     Changes and New Features
* ToDo::                        Future Development
* FAQ::                         Frequently Asked Questions
* Key Index::                   Key Index
* Function Index::              Function Index
* Variable Index::              Variable Index
* Concept Index::               Concept Index


File: auctex.info,  Node: Copying,  Next: Introduction,  Prev: Top,  Up: Top

Copying
*******

(This text stolen from the TeXinfo 2.16 distribution).

   The programs currently being distributed that relate to AUCTeX
include lisp files for Emacs (and XEmacs).  These programs are "free";
this means that everyone is free to use them and free to redistribute
them on a free basis.  The AUCTeX related programs are not in the
public domain; they are copyrighted and there are restrictions on their
distribution, but these restrictions are designed to permit everything
that a good cooperating citizen would want to do.  What is not allowed
is to try to prevent others from further sharing any version of these
programs that they might get from you.

   Specifically, we want to make sure that you have the right to give
away copies of the programs that relate to AUCTeX, that you receive
source code or else can get it if you want it, that you can change these
programs or use pieces of them in new free programs, and that you know
you can do these things.

   To make sure that everyone has such rights, we have to forbid you to
deprive anyone else of these rights.  For example, if you distribute
copies of the AUCTeX related programs, you must give the recipients all
the rights that you have.  You must make sure that they, too, receive
or can get the source code.  And you must tell them their rights.

   Also, for our own protection, we must make certain that everyone
finds out that there is no warranty for the programs that relate to
AUCTeX.  If these programs are modified by someone else and passed on,
we want their recipients to know that what they have is not what we
distributed, so that any problems introduced by others will not reflect
on our reputation.

   The precise conditions of the licenses for the programs currently
being distributed that relate to AUCTeX are found in the General Public
Licenses that accompany them.


File: auctex.info,  Node: Introduction,  Next: Installation,  Prev: Copying,  Up: Top

Introduction to AUCTeX
**********************

This section of the AUCTeX manual gives a brief overview of what AUCTeX
is, and the section is also available as a `README' file.  It is *not*
an attempt to document AUCTeX.  Real documentation for AUCTeX is
available in the rest of the manual, which you can find in the `doc'
directory.

   Read the `INSTALL' or `INSTALL.windows' file respectively for
information about how to install AUCTeX.  The files comprise the same
information as the Installation chapter in the AUCTeX manual.

   If you are upgrading from the previous version of AUCTeX, the latest
changes can be found in the `CHANGES' file.  If you are upgrading from
an older version, read the History chapter in the AUCTeX manual.

   AUCTeX is a comprehensive customizable integrated environment for
writing input files for TeX/LaTeX/ConTeXt using GNU Emacs.

   AUCTeX lets you run TeX/LaTeX/ConTeXt and LaTeX/ConTeXt-related
tools, such as a output filters or post processor from inside Emacs.
Especially `running LaTeX' is interesting, as AUCTeX lets you browse
through the errors TeX reported, while it moves the cursor directly to
the reported error, and displays some documentation for that particular
error.  This will even work when the document is spread over several
files.

   AUCTeX automatically indents your `LaTeX-source', not only as you
write it -- you can also let it indent and format an entire document.
It has a special outline feature, which can greatly help you `getting an
overview' of a document.

   Apart from these special features, AUCTeX provides a large range of
handy Emacs macros, which in several different ways can help you write
your LaTeX/ConTeXt documents fast and painlessly.

   All features of AUCTeX are documented using the GNU Emacs online
documentation system.  That is, documentation for any command is just a
key click away!

   AUCTeX is written entirely in Emacs-Lisp, and hence you can easily
add new features for your own needs.  It was not made as part of any
particular employment or project (apart from the AUCTeX project
itself).  AUCTeX is distributed under the `GNU Emacs General Public
License' and may therefore almost freely be copied and redistributed.

   The next sections are a short introduction to some `actual' features.
For further information, refer to the built-in online documentation of
AUCTeX.

Availability
============

The most recent version is always available at

                                   <http://ftp.gnu.org/pub/gnu/auctex/>

   WWW users may want to check out the AUCTeX page at

                                  <http://www.gnu.org/software/auctex/>

Contacts
========

There has been established a mailing list for help, bug reports, feature
requests and general discussion about AUCTeX.  You're very welcome to
join.  Traffic average at an article by day, but they come in bursts.
If you are only interested in information on updates, you could refer to
the newsgroups `comp.text.tex' and `gnu.emacs.sources'.

   If you want to contact the AUCTeX mailing list, send mail to
<auc-tex-subscribe@sunsite.dk> in order to join.  Articles should be
sent to <auc-tex@sunsite.dk>.

   To contact the current maintainers of AUCTeX directly, email
<auc-tex_mgr@sunsite.dk>.


File: auctex.info,  Node: Installation,  Next: Quick Start,  Prev: Introduction,  Up: Top

Installing AUCTeX
*****************

Installing AUCTeX should be simple: merely `./configure', `make', and
`make install'. This does not yet activate the package, but merely
makes it available. See *Note Loading the package:: for the activation.
Please read through this document fully before installing anything.
The installation procedure has changed as compared to earlier versions.
In particular, note that there is some additional information for
MS Windows installations in *Note Installation under MS Windows::.

* Menu:

* Prerequisites::
* Configure::
* Build/install::
* Loading the package::
* Advice for package providers::
* Advice for non-privileged users::
* Installation under MS Windows::
* Customizing::


File: auctex.info,  Node: Prerequisites,  Next: Configure,  Up: Installation

Prerequisites
=============

   * A recent version of Emacs 21, alternatively XEmacs 21.

     Support for Emacs 20 has been dropped in favor of getting more
     important work done.  For XEmacs, you need at least version 1.84
     of the `xemacs-base' package (released on 01/27/2004) or a sumo
     tarball dated 02/02/2004 or newer for compiling AUCTeX because of
     non-trivial changes in `easy-mmode.el': please use the XEmacs
     package system for upgrading if necessary.  The current developers
     don't have the resources for providing backward compatibility to
     earlier versions.

   * A working LaTeX installation

     This is not really needed to _install_ the package, but will be
     required for useful operation of it. The elisp of AUCTeX will
     probably run without LaTeX, but you will find relatively little
     use for it.

   * The `texinfo' package

     This is needed for building the documentation. If you don't have
     this, or you have a too old version of it (try building and you'll
     find out), you may download a separate tar file with the prebuilt
     documentation from Savannah and install it over the main unpacked
     tar archive.


File: auctex.info,  Node: Configure,  Next: Build/install,  Prev: Prerequisites,  Up: Installation

Configure
=========

The first step is to configure the source code, telling it where
various files will be.  To do so, run

     ./configure OPTIONS

   (Note: if you have fetched AUCTeX from CVS rather than a regular
release, you will have to first generate `./configure' by running
`autogen.sh' in the `auctex' directory.)

   On many machines, you will not need to specify any options, but if
`configure' cannot determine something on its own, you'll need to help
it out with one of these options:

`--with-emacs[=/PATH/TO/EMACS]'
     If you are using a pretest which isn't in your `$PATH', or
     `configure' is not finding the right Emacs executable, you can
     specify it with this option.

`--with-xemacs[=/PATH/TO/XEMACS]'
     Configure for generation under XEmacs (Emacs is the default).
     Again, the name of the right XEmacs executable can be specified,
     complete with path if necessary.

`--with-lispdir=/DIR'
     This tells where to install the lisp files, note that most of
     AUCTeX will be installed in a subdirectory. Normally, this option
     is unnecessary, but may be used if you don't like the directory
     that configure is suggesting.

`--with-packagedir=/DIR'
     This tells where to install the XEmacs Package.  Again, this
     option is normally unnecessary, but may be used if you don't like
     the directory that configure is suggesting, and you know that
     XEmacs regards the directory you specify as a package directory.

     If you are installing AUCTeX for a single user, and you have
     installed no XEmacs packages as that user before, then `configure'
     may try to install AUCTeX in the systemwide package directory
     (that it cannot write to), causing installation to fail.  In that
     case, a good value for this option is `~/.xemacs/xemacs-packages',
     as XEmacs looks there for per-user packages by default.

`--with-auto-dir=/DIR'
     You can use this option to specify the directory containing
     automatically generated information.  It is not necessary for most
     TeX installs, but may be used if you don't like the directory that
     configure is suggesting.

`--help'
     This is not an option specific to AUCTeX. A number of standard
     options to `configure' exist, and we do not have the room to
     describe them here; a short description of each is available, using
     `--help'.



File: auctex.info,  Node: Build/install,  Next: Loading the package,  Prev: Configure,  Up: Installation

Build/install
=============

Once `configure' has been run, simply enter

     make

at the prompt to byte-compile the lisp files, and build the
documentation files. To install the files into the locations chosen
earlier, type

     make install

You may need special privileges to install, e.g., if you are installing
into system directories.


File: auctex.info,  Node: Loading the package,  Next: Advice for package providers,  Prev: Build/install,  Up: Installation

Loading the package
===================

First you should make sure that AUCTeX gets loaded.  You then need to
place a few lines in your personal `.emacs' file (or a site-wide
configuration file).

   For XEmacs, if you specified a valid package directory during
installation, or none at all, then XEmacs installation should do
everything necessary in order to install AUCTeX as a package and
activate it.  Restarting XEmacs should then make the package visible,
and `C-c C-c' should give you a command prompt.

   If you used `--with-packagedir', you have to make sure that the
directory `lisp/auctex' under the directory you specified is in XEmacs'
`load-path' variable.

   For GNU Emacs, the recommended way to activate AUCTeX is to add the
following line to your `.emacs' file:

     (require 'tex-site)

   If you used `--with-lispdir', you have to make sure that the
directory specified is in Emacs' `load-path' variable, so that you
would instead use, e.g.,

     (setq load-path (cons "~/elisp" load-path))
     (require 'tex-site)

   For site-wide activation in GNU Emacs, see *Note Advice for package
providers::.

   That is all.  There are other ways of achieving the equivalent thing,
but we don't mention them here any more since they are not better, and
people got confused into trying everything at once.


File: auctex.info,  Node: Advice for package providers,  Next: Advice for non-privileged users,  Prev: Loading the package,  Up: Installation

Providing AUCTeX as a package
=============================

As a package provider, you should make sure that your users will be
served best according to their intentions, and keep in mind that a
system might be used by more than one user, with different preferences.
The use of packages should in general not impact performance negatively
if a user chooses not to employ it, but should be as convenient as
possible. The policy with regard to AUCTeX has been to _refrain_ from
activating it automatically when it is installed as a package. This is
reasonable because

   * Emacs comes with a simpler default TeX mode with different
     keybindings.  Some users might prefer that.

   * AUCTeX is activated via `(require 'tex-site)'.  Once this has
     happened, it is not possible to get back the original TeX mode.  A
     site-wide default would for this reason be hard to override.

   If, however, you are certain that the users all prefer AUCTeX, you
may place the following line in `default.el':

     (require 'tex-site)

   XEmacs uses a package system.  The default AUCTeX installation
should cater for everything necessary in that case.


File: auctex.info,  Node: Advice for non-privileged users,  Next: Installation under MS Windows,  Prev: Advice for package providers,  Up: Installation

Installation for non-privileged users
=====================================

Often people without system administration privileges want to install
software for their private use.  In that case you need to specify more
options top the `configure' script.  For XEmacs users, this is fairly
easy, because the XEmacs package system has been designed to make this
sort of thing practical: but GNU Emacs users (and XEmacs users for whom
the package system is for some reason misbehaving) may need to do a
little more work.

   GNU Emacs users can solve this problem by using the `--prefix'
option to the `configure' script, and let it point to the personal home
directory.  In that way, resulting binaries will be installed under the
`bin' subdirectory of your home directory, manual pages under `man' and
so on.  That way, it is reasonably easy to maintain a bunch of
additional packages, since the prefix argument is supported by most
`configure' scripts.

   You'll have to add something like
`/home/myself/share/emacs/site-lisp' to your `load-path' variable, if
it isn't there already.

   XEmacs users can achieve the same end by pointing `configure' at an
appropriate package directory (normally
`--with-packagedir=~/.xemacs/xemacs-packages' will serve).  This should
only need to be done once, and should be needed fairly rarely; if you
have installed any personal XEmacs packages before, `configure' should
detect that, and automatically install AUCTeX there too; equally, if
you have installed AUCTeX somewhere searched by XEmacs, AUCTeX should
be automatically reinstalled over that copy.

   (`configure' may guess wrong if the site administrator has installed
AUCTeX somewhere else: if so, just use the `--with-packagedir' option
to override `configure''s choice.)

   But there is another problem: perhaps you want to make it easy for
other users to share parts of your personal Emacs configuration.  In
general, you can do this by writing `~myself/' anywhere where you
specify paths to something installed in your personal subdirectories,
not merely `~/', since the latter, when used by other users, will point
to non-existent files.

   For yourself, it will do to manipulate environment variables in your
`.profile' resp. `.login' files.  But if people will be copying just
Elisp files, their copies will not work.  While it would in general be
preferable if the added components where available from a shell level,
too (like when you call the standalone info reader, or try using
`preview.sty' for functionality besides of Emacs previews), it will be
a big help already if things work from inside of Emacs.

   Here is how to do the various parts:

Making the Elisp available
--------------------------

In XEmacs, you should ask the other users to add symbolic links in their
`~/.xemacs/xemacs-packages/lisp', `~/.xemacs/xemacs-packages/info' and
`~/.xemacs/xemacs-packages/etc' directories. (Alas, there is presently
no easy programmatic way to do this, except to have a script do the
symlinking for them.)

   In GNU Emacs, you'll want the invocation lines described in *Note
Loading the package::.  In addition, you'll want a line such as

     (add-to-list 'load-path "~myself/share/emacs/site-lisp/preview")

Making the Info files available
-------------------------------

While for yourself, you'll probably want to manipulate the `INFOPATH'
variable; for access inside of Elisp something like the following might
be convenient:

     (eval-after-load 'info
        '(add-to-list 'Info-directory-list "~myself/info"))

   In XEmacs, as long as XEmacs can see the package, there should be no
need to do anything at all; the info files should be immediately
visible.  However, you might want to set `INFOPATH' anyway, for the
sake of standalone readers outside of XEmacs. (The info files in XEmacs
are normally in `~/.xemacs/xemacs-packages/info'.)


File: auctex.info,  Node: Installation under MS Windows,  Next: Customizing,  Prev: Advice for non-privileged users,  Up: Installation

Installation under MS Windows
=============================

Installation of AUCTeX is a bit more complicated, but we are working to
resolve the issues involved. Please report success/failure to us at
`auc-tex@sunsite.dk'. Here are the steps to perform:

  1. The installation of AUCTeX will require the MSYS tool set from
     `http://www.mingw.org'. If you have the Cygwin tool set from
     `http://cygwin.com' installed, that should do just fine as well,
     but it is quite larger and slower.

     If you are installing AUCTeX with one of those sets for an Emacs
     compiled in a different one, you should try to avoid tool-specific
     path names like `/cygwin/c'.  Instead, use the `c:' syntax.  It
     might also help to use forward slashes instead of the backward
     slashes more typical for MS Windows: while backward slashes are
     supposed to work if properly escaped in the shell, this is one
     area easily overlooked by the developers.  The same holds for file
     or directory names with spaces in them.  Of course, we want to
     hear about any problems in that area.

     Compiling Emacs is outside of the scope of this manual.  AUCTeX
     itself does not require a C compiler for installation.

  2. Install GNU Emacs from `http://ftp.gnu.org/pub/gnu/windows/emacs/'
     or XEmacs from `http://www.xemacs.org'.

  3. You need a working TeX installation.  One popular installation
     under Windows is MikTeX (http://www.miktex.org).  Another much more
     extensive system is TeX live (http://www.tug.org/texlive) which is
     rather close to its Unix cousins.

  4. Now the fun stuff starts. Unpack the AUCTeX distribution into some
     installation directory. *Do not* unpack it right into your Emacs'
     own directories: the installation will copy the material that
     needs to be placed there. Keep the installation directory
     separate: you can remove its contents after installation
     completes. Since you are reading this, you probably have already
     unpacked AUCTeX, but it should still be easy to move it elsewhere
     now.

  5. Ready for takeoff. Start some shell (typically `bash') capable of
     running `configure', change into the installation directory and
     call `./configure' with appropriate options.

     Typical options you'll want to specify will be
    `--prefix=DRIVE:/PATH/TO/EMACS-DIRECTORY'
          which makes sure that (1) the AUCTeX manual will be installed
          in the `info/' directory of your Emacs installation and (2)
          the automatically generated global style hooks will be
          installed in the `var/' directory of your Emacs installation.
          If you are collecting stuff like that in a central directory
          hierarchy (not untypical with Cygwin), you might want to
          specify that here instead.  You stand a good chance that this
          will be the only option you need to supply, as long as your
          TeX-related executables are in your system path, which they
          better be for AUCTeX's operation, anyway.

    `--with-emacs'
          if you are installing for a version of Emacs.  You can use
          `--with-emacs=/PATH/TO/EMACS' to specify the name of the
          installed Emacs executable, complete with its path if
          necessary (if Emacs is not within a directory specified in
          your PATH environment setting).

    `--with-xemacs'
          if you are installing for a version of XEmacs.  Again, you
          can use `--with-xemacs=/PATH/TO/XEMACS' to specify the name
          of the installed XEmacs executable complete with its path if
          necessary.  It may also be necessary to specify this option
          if a copy of Emacs is found in your PATH environment setting,
          but you still would like to install a copy of AUCTeX for
          XEmacs.

    `--with-lispdir=/DIR'
          This may be needed for GNU Emacs installation, but hopefully
          `configure' should figure this out by itself. Don't use this
          for XEmacs, rather use

    `--with-packagedir=/DIR'
          which gives the location of the package directory for XEmacs
          where stuff should be installed. Again, hopefully this is not
          necessary to specify.

    `--with-auto-dir=/DIR'
          Directory containing automatically generated information.
          You should not normally need to set this, as `--prefix'
          should take care of this.

     Some additional information about the above options may be found in
     *Note Configure::.

  6. If you need to use the prebuilt documentation (see above), now is
     the time to unpack it over the rest of the installation directory.

  7. Run `make' in the installation directory (we have had one report
     that Emacs did not manage to byte compile the Elisp files, and
     that had to be done by hand.  No idea about what might have gone
     wrong there).

  8. Run `make install' in the installation directory.

  9. For GNU Emacs, the recommended way to activate AUCTeX is to add the
     following line to your `.emacs' file:

          (require 'tex-site)

     The configuration for Windows systems is probably not quite
     fitting.  Instead of loading `tex-site.el' in that manner, you
     might want to load `tex-mik.el' (for MikTeX) or `tex-fptex' (for
     fpTeX) instead.  Those will lead to somewhat more appropriate
     values for your system.  You can always use

            M-x customize-group <RET> AUCTeX <RET>

     in order to customize more stuff, or use the `Customize' menu.

 10. Load a `.tex' file Emacs or XEmacs and see if you get the
     `Command' menu. Try using that to LaTeX the file.

        Well, that about is all.  Have fun!


File: auctex.info,  Node: Customizing,  Prev: Installation under MS Windows,  Up: Installation

Customizing
===========

Most of the site-specific customization should already have happened
during configuration of AUCTeX.  Any further customization can be done
with customization buffers directly in Emacs.  Just type `M-x
customize-group RET AUCTeX RET' to open the customization group for
AUCTeX or use the menu entries provided in the mode menus.  Editing the
file `tex-site.el' as suggested in former versions of AUCTeX should not
be done anymore because the installation routine will overwrite those
changes.

   You might check some variables with a special significance.  They are
accessible directly by typing `M-x customize-variable RET <variable>
RET'.

 - User Option: TeX-lisp-directory
     The directory where you installed the AUCTeX lisp files.

   This variable is set automatically during configuration.  If you
don't issue a `make install', for example if you don't want to install
AUCTeX in a different place, you will have to set this variable
manually to the location of the compiled files.  It is generally
advisable to do a full installation including `make install' because
program and documentation files will be copied to their proper places.

 - User Option: TeX-macro-global
     Directories containing the site's TeX style files.

   Normally, AUCTeX will only allow you to complete macros and
environments which are built-in, specified in AUCTeX style files or
defined by yourself.  If you issue the `M-x TeX-auto-generate-global'
command after loading AUCTeX, you will be able to complete on all
macros available in the standard style files used by your document.  To
do this, you must set this variable to a list of directories where the
standard style files are located.  The directories will be searched
recursively, so there is no reason to list subdirectories explicitly.
Automatic configuration will already have set the variable for you if
it could use the program `kpsewhich'.  In this case you normally don't
have to alter anything.

Contributed files
=================

There are several files that are not part of AUCTeX proper, but
included in the distribution in case they are useful.

`bib-cite.el'
     Better support for bibliographies and much more.

`tex-jp.el'
     Support for Japanese.


   They can be installed together with AUCTeX by executing `make
contrib' and `make install-contrib'.  Read the comments in the start of
each file for more information about how to use the files, what they
do, and who wrote and maintains them.


File: auctex.info,  Node: Quick Start,  Next: Frequently Used Commands,  Prev: Installation,  Up: Top

Quick Start
***********

AUCTeX is a powerful program offering many features and configuration
options.  If you are new to AUCTeX this might be deterrent.
Fortunately you do not have to learn everything at once.  This Quick
Start Guide will give you the knowledge of the most important commands
and enable you to prepare your first LaTeX document with AUCTeX after
only a few minutes of reading.

   In this introduction, we assume that AUCTeX is already installed on
your system.  If this is not the case, you should read the file
`INSTALL' in the base directory of the unpacked distribution tarball.
These installation instructions are available in this manual as well,
*Note Installation::.  We also assume that you are familiar with the
way keystrokes are written in Emacs manuals.  If not, have a look at
the Emacs Tutorial in the Help menu.

   If AUCTeX is installed, you might still need to activate it, by
inserting

     (require 'tex-site)

   in your user init file.(1)  In order to get support for many of the
LaTeX packages you will use in your documents, you should enable
document parsing as well, which can be achieved by putting

     (setq TeX-auto-save t)
     (setq TeX-parse-self t)

   into your init file.  Finally, if you often use `\include' or
`\input', you should make AUCTeX aware of the multi-file document
structure.  You can do this by inserting

     (setq-default TeX-master nil)

   into your init file.  Each time you open a new file, AUCTeX will then
ask you for a master file.

* Menu:

* Editing::                     Functions for editing TeX files
* Processing::                  Creating and viewing output, debugging

   ---------- Footnotes ----------

   (1) This usually is a file in your home directory called `.emacs' if
you are utilizing GNU Emacs or `.xemacs/init.el' if you are using
XEmacs.


File: auctex.info,  Node: Editing,  Next: Processing,  Up: Quick Start

Functions for editing TeX files
===============================

Making your TeX code more readable
----------------------------------

AUCTeX can do syntax highlighting of your source code, that means
commands will get special colors or fonts.  You can enable it locally by
typing `M-x font-lock-mode RET'.  If you want to have font locking
activated generally, enable `global-font-lock-mode', e.g. with `M-x
customize-variable RET global-font-lock-mode RET'.

   AUCTeX will indent new lines to indicate their syntactical
relationship to the surrounding text.  For example, the text of a
`\footnote' or text inside of an environment will be indented relative
to the text around it.  If the indenting has gotten wrong after adding
or deleting some characters, use <TAB> to reindent the line, `M-q' for
the whole paragraph, or `M-x LaTeX-fill-buffer RET' for the whole
buffer.

Entering sectioning commands
----------------------------

Insertion of sectioning macros, that is `\chapter', `\section',
`\subsection', etc. and accompanying `\label' commands may be eased by
using `C-c C-s'.  You will be asked for the section level.  As nearly
everywhere in AUCTeX, you can use the <TAB> or <SPC> key to get a list
of available level names, and to auto-complete what you started typing.
Next, you will be asked for the printed title of the section, and last
you will be asked for a label to be associated with the section.

Inserting environments
----------------------

Similarly, you can insert environments, that is `\begin{}'-`\end{}'
pairs: Type `C-c C-e', and select an environment type.  Again, you can
use <TAB> or <SPC> to get a list, and to complete what you type.
Actually, the list will not only provide standard LaTeX environments,
but also take your `\documentclass' and `\usepackage' commands into
account if you have parsing enabled by setting `TeX-parse-self' to `t'.
If you use a couple of environments frequently, you can use the up and
down arrow keys (or `M-p' and `M-n') in the minibuffer to get back to
the previously inserted commands.

   Some environments need additional arguments.  Often, AUCTeX knows
about this and asks you to enter a value.

Inserting macros
----------------

`C-c C-m', or simply `C-c RET' will give you a prompt that asks you for
a LaTeX macro.  You can use <TAB> for completion, or the up/down arrow
keys (or `M-p' and `M-n') to browse the command history.  In many
cases, AUCTeX knows which arguments a macro needs and will ask you for
that.  It even can differentiate between mandatory and optional
arguments--for details, see *Note Completion::.

   An additional help for inserting macros is provided by the
possibility to complete macros right in the buffer.  With point at the
end of a partially written macro, you can complete it by typing `M-TAB'.

Changing the font
-----------------

AUCTeX provides convenient keyboard shortcuts for inserting macros
which specify the font to be used for typesetting certain parts of the
text.  They start with `C-c C-f', and the last `C-' combination tells
AUCTeX which font you want:

`C-c C-f C-b'
     Insert bold face `\textbf{-!-}' text.

`C-c C-f C-i'
     Insert italics `\textit{-!-}' text.

`C-c C-f C-e'
     Insert emphasized `\emph{-!-}' text.

`C-c C-f C-s'
     Insert slanted `\textsl{-!-}' text.

`C-c C-f C-r'
     Insert roman \textrm{-!-} text.

`C-c C-f C-f'
     Insert  sans serif `\textsf{-!-}' text.

`C-c C-f C-t'
     Insert typewriter `\texttt{-!-}' text.

`C-c C-f C-c'
     Insert SMALL CAPS `\textsc{-!-}' text.

`C-c C-f C-d'
     Delete the innermost font specification containing point.


   If you want to change font attributes of existing text, mark it as a
region, and then invoke the commands.  If no region is selected, the
command will be inserted with empty braces, and you can start typing the
changed text.

   Most of those commands will also work in math mode, but then macros
like `\mathbf' will be inserted.

Other useful features
---------------------

AUCTeX also tries to help you when inserting the right "quote" signs
for your language, dollar signs to typeset math, or pairs of braces.
It offers shortcuts for commenting out text (`C-c ;' for the current
region or `C-c %' for the paragraph you are in).  The same keystrokes
will remove the % signs, if the region or paragraph is commented out
yet.  With `TeX-fold-mode', you can hide certain parts (like footnotes,
references etc.) that you do not edit currently.  Support for Emacs'
outline mode is provided as well.  And there's more, but this is beyond
the scope of this Quick Start Guide.


File: auctex.info,  Node: Processing,  Prev: Editing,  Up: Quick Start

Creating and viewing output, debugging
======================================

One Command for LaTeX, helpers, viewers, and printing
-----------------------------------------------------

If you have typed some text and want to run LaTeX (or TeX, or other
programs--see below) on it, type `C-c C-c'.  If applicable, you will be
asked whether you want to save changes, and which program you want to
invoke.  In many cases, the choice that AUCTeX suggests will be just
what you want: first `latex', then a viewer.  If a `latex' run produces
or changes input files for `makeindex', the next suggestion will be to
run that program, and AUCTeX knows that you need to run `latex' again
afterwards--the same holds for BibTeX.

   When no processor invocation is necessary anymore, AUCTeX will
suggest to run a viewer, or you can chose to create a PostScript file
using `dvips', or to directly print it.

   At this place, a warning needs to be given: First, although AUCTeX is
really good in detecting the standard situations when an additional
`latex' run is necessary, it cannot detect it always.  Second, the
creation of PostScript files or direct printing currently only works
when your output file is a DVI file, not a PDF file.

   Ah, you didn't know you can do both?  That brings us to the next
topic.

Choosing an output format
-------------------------

From a LaTeX file, you can produce DVI output, or a PDF file directly
via `pdflatex'.  You can switch on source specials for easier
navigation in the output file, or tell `latex' to stop after an error
(usually `\noninteractive' is used, to allow you to detect all errors
in a single run).

   These options are controlled by toggles, the keystrokes should be
easy to memorize:

`C-c C-t C-p'
     This command toggles between DVI and PDF output

`C-c C-t C-i'
     toggles interactive mode

`C-c C-t C-s'
     toggles source specials support

`C-c C-t C-o'
     toggles usage of Omega/lambda.


Debugging LaTeX
---------------

When AUCTeX runs a program, it creates an output buffer in which it
displays the output of the command.  If there is a syntactical error in
your file, `latex' will not complete successfully. AUCTeX will tell you
that, and you can get to the place where the first error occured by
pressing `C-c `' (the last character is a backtick).  The view will be
split in two windows, the output will be displayed in the lower buffer,
and both buffers will be centered around the place where the error
ocurred.  You can then try to fix it in the document buffer, and use
the same keystrokes to get to the next error.  This procedure may be
repeated until all errors have been dealt with.  By pressing `C-c C-w'
(`TeX-toggle-debug-boxes') you can toggle whether AUCTeX should notify
you of overfull and underfull boxes in addition to regular errors.

   If a command got stuck in a seemingly infinite loop, or you want to
stop execution for other reasons, you can use `C-c C-k' (for "kill").
Similar to `C-l', which centers the buffer you are in around your
current position, `C-c C-l' centers the output buffer so that the last
lines added at the bottom become visible.

Running LaTeX on parts of your document
---------------------------------------

If you want to check how some part of your text looks like, and do not
want to wait until the whole document has been typeset, then mark it as
a region and use `C-c C-r'.  It behaves just like `C-c C-c', but it
only uses the document preamble and the region you marked.

   If you are using `\include' or `\input' to structure your document,
try `C-c C-b' while you are editing one of the included files.  It will
run `latex' only on the current buffer, using the preamble from the
master file.


File: auctex.info,  Node: Frequently Used Commands,  Next: Advanced Features,  Prev: Quick Start,  Up: Top

Inserting Frequently Used Commands
**********************************

The most commonly used commands/macros of AUCTeX are those which simply
insert templates for often used TeX and/or LaTeX/ConTeXt constructs,
like font changes, handling of environments, etc.  These features are
very simple, and easy to learn, and help you avoid stupid mistakes like
mismatched braces, or `\begin{}'-`\end{}' pairs.

* Menu:

* Quotes::                      Inserting double quotes
* Font Specifiers::             Inserting Font Specifiers
* Sectioning::                  Inserting chapters, sections, etc.
* Environments::                Inserting Environment Templates


File: auctex.info,  Node: Quotes,  Next: Font Specifiers,  Up: Frequently Used Commands

Insertion of Quotes, Dollars, and Braces
========================================

In TeX, literal double quotes `"like this"' are seldom used, instead
two single quotes are used ```like this'''.  To help you insert these
efficiently, AUCTeX allows you to continue to press `"' to insert two
single quotes.  To get a literal double quote, press `"' twice.

 - Command: TeX-insert-quote COUNT
     (`"') Insert the appropriate quote marks for TeX.

     Inserts the value of `TeX-open-quote' (normally ```') or
     `TeX-close-quote' (normally `''') depending on the context.  With
     prefix argument, always inserts `"' characters.

 - User Option: TeX-open-quote
     String inserted by typing `"' to open a quotation.

 - User Option: TeX-close-quote
     String inserted by typing `"' to close a quotation.

 - User Option: TeX-quote-after-quote
     Determines the behavior of `"'.  If it is non-nil, typing `"' will
     insert a literal double quote.  The respective values of
     `TeX-open-quote' and `TeX-close-quote' will be inserted after
     typing `"' once again.

   If you include the style files `german' or `ngerman'
`TeX-open-quote' and `TeX-close-quote' will be set to the values of
`LaTeX-german-open-quote' and `LaTeX-german-close-quote' respectively.
`TeX-quote-after-quote' will be set to the value of
`LaTeX-german-quote-after-quote'.  If you write texts which facilitate
the style files mentioned before, you should customize those special
variables instead of the standard variables.

   Similarly you should customize `LaTeX-csquotes-open-quote',
`LaTeX-csquotes-close-quote' and `LaTeX-csquotes-quote-after-quote' if
you use the `csquotes' package.  The quotation characters will only be
used if both variables--`LaTeX-csquotes-open-quote' and
`LaTeX-csquotes-close-quote'--are non-empty strings.  But then the
`csquotes'-related values will take precedence over the
`(n)german'-related ones.

   In AUCTeX, dollar signs should match like they do in TeX.  This has
been partially implemented, we assume dollar signs always match within
a paragraph.  The first `$' you insert in a paragraph will do nothing
special.  The second `$' will match the first.  This will be indicated
by moving the cursor temporarily over the first dollar sign.  If you
enter a dollar sign that matches a double dollar sign `$$' AUCTeX will
automatically insert two dollar signs.  If you enter a second dollar
sign that matches a single dollar sign, the single dollar sign will
automatically be converted to a double dollar sign.

 - Command: TeX-insert-dollar ARG
     (`$') Insert dollar sign.

     Show matching dollar sign if this dollar sign end the TeX math
     mode.  Ensure double dollar signs match up correctly by inserting
     extra dollar signs when needed.

     With optional ARG, insert that many dollar signs.

   To avoid unbalanced braces, it is useful to insert them pairwise.
You can do this by typing `C-c {'.

 - Command: TeX-insert-braces
     (`C-c {') Make a pair of braces and position the cursor to type
     inside of them.


File: auctex.info,  Node: Font Specifiers,  Next: Sectioning,  Prev: Quotes,  Up: Frequently Used Commands

Inserting Font Specifiers
=========================

Perhaps the most used keyboard commands of AUCTeX are the short-cuts
available for easy insertion of font changing macros.

   If you give an argument (that is, type `C-u') to the font command,
the innermost font will be replaced, i.e. the font in the TeX group
around point will be changed.  The following table shows the available
commands, with `-!-' indicating the position where the text will be
inserted.

`C-c C-f C-b'
     Insert bold face `\textbf{-!-}' text.

`C-c C-f C-i'
     Insert italics `\textit{-!-}' text.

`C-c C-f C-e'
     Insert emphasized `\emph{-!-}' text.

`C-c C-f C-s'
     Insert slanted `\textsl{-!-}' text.

`C-c C-f C-r'
     Insert roman \textrm{-!-} text.

`C-c C-f C-f'
     Insert sans serif `\textsf{-!-}' text.

`C-c C-f C-t'
     Insert typewriter `\texttt{-!-}' text.

`C-c C-f C-c'
     Insert SMALL CAPS `\textsc{-!-}' text.

`C-c C-f C-d'
     Delete the innermost font specification containing point.


 - Command: TeX-font ARG
     (`C-c C-f') Insert template for font change command.

     If REPLACE is not nil, replace current font.  WHAT determines the
     font to use, as specified by `TeX-font-list'.

 - User Option: TeX-font-list
     List of fonts used by TeX-font.

     Each entry is a list with three elements.  The first element is the
     key to activate the font.  The second element is the string to
     insert before point, and the third element is the string to insert
     after point.  An optional fourth element means always replace if
     not nil.


File: auctex.info,  Node: Sectioning,  Next: Environments,  Prev: Font Specifiers,  Up: Frequently Used Commands

Inserting chapters, sections, etc.
==================================

Insertion of sectioning macros, that is `\chapter', `\section',
`\subsection', etc. and accompanying `\label''s may be eased by using
`C-c C-s'.  This command is highly customizable, the following
describes the default behavior.

   When invoking you will be asked for a section macro to insert.  An
appropriate default is automatically selected by AUCTeX, that is
either: at the top of the document; the top level sectioning for that
document style, and any other place: The same as the last occurring
sectioning command.

   Next, you will be asked for the actual name of that section, and
last you will be asked for a label to be associated with that section.
The label will be prefixed by the value specified in
`LaTeX-section-hook'.

 - Command: LaTeX-section ARG
     (`C-c C-s') Insert a sectioning command.

     Determine the type of section to be inserted, by the argument ARG.

        * If ARG is nil or missing, use the current level.

        * If ARG is a list (selected by C-u), go downward one level.

        * If ARG is negative, go up that many levels.

        * If ARG is positive or zero, use absolute level:
             + 0 : part

             + 1 : chapter

             + 2 : section

             + 3 : subsection

             + 4 : subsubsection

             + 5 : paragraph

             + 6 : subparagraph

     The following variables can be set to customize the function.

    `LaTeX-section-hook'
          Hooks to be run when inserting a section.

    `LaTeX-section-label'
          Prefix to all section references.


   The precise behavior of `LaTeX-section' is defined by the contents
of `LaTeX-section-hook'.

 - User Option: LaTeX-section-hook
     List of hooks to run when a new section is inserted.

     The following variables are set before the hooks are run

    LEVEL
          Numeric section level, default set by prefix arg to
          `LaTeX-section'.

    NAME
          Name of the sectioning command, derived from LEVEL.

    TITLE
          The title of the section, default to an empty string.

    TOC
          Entry for the table of contents list, default nil.

    DONE-MARK
          Position of point afterwards, default nil meaning after the
          inserted text.

     A number of hooks are already defined.  Most likely, you will be
     able to get the desired functionality by choosing from these hooks.

    `LaTeX-section-heading'
          Query the user about the name of the sectioning command.
          Modifies LEVEL and NAME.

    `LaTeX-section-title'
          Query the user about the title of the section. Modifies TITLE.

    `LaTeX-section-toc'
          Query the user for the toc entry.  Modifies TOC.

    `LaTeX-section-section'
          Insert LaTeX section command according to NAME, TITLE, and
          TOC.  If TOC is nil, no toc entry is inserted.  If TOC or
          TITLE are empty strings, DONE-MARK will be placed at the
          point they should be inserted.

    `LaTeX-section-label'
          Insert a label after the section command.  Controlled by the
          variable `LaTeX-section-label'.

     To get a full featured `LaTeX-section' command, insert

          (setq LaTeX-section-hook
                '(LaTeX-section-heading
          	LaTeX-section-title
          	LaTeX-section-toc
          	LaTeX-section-section
          	LaTeX-section-label))

     in your `.emacs' file.

   The behavior of `LaTeX-section-label' is determined by the variable
`LaTeX-section-label'.

 - User Option: LaTeX-section-label
     Default prefix when asking for a label.

     If it is a string, it is used unchanged for all kinds of sections.
     If it is nil, no label is inserted.  If it is a list, the list is
     searched for a member whose car is equal to the name of the
     sectioning command being inserted.  The cdr is then used as the
     prefix.  If the name is not found, or if the cdr is nil, no label
     is inserted.

     By default, chapters have a prefix of `cha:' while sections and
     subsections have a prefix of `sec:'.  Labels are not automatically
     inserted for other types of sections.


File: auctex.info,  Node: Environments,  Prev: Sectioning,  Up: Frequently Used Commands

Inserting Environment Templates
===============================

A large apparatus is available that supports insertions of environments,
that is `\begin{}' -- `\end{}' pairs.

   AUCTeX is aware of most of the actual environments available in a
specific document.  This is achieved by examining your `\documentclass'
command, and consulting a precompiled list of environments available in
a large number of styles.

   You insert an environment with `C-c C-e', and select an environment
type.  Depending on the environment, AUCTeX may ask more questions
about the optional parts of the selected environment type.  With `C-u
C-c C-e' you will change the current environment.

 - Command: LaTeX-environment ARG
     (`C-c C-e')  AUCTeX will prompt you for an environment to insert.
     At this prompt, you may press <TAB> or <SPC> to complete a
     partially written name, and/or to get a list of available
     environments.  After selection of a specific environment AUCTeX may
     prompt you for further specifications.

     If the optional argument ARG is not-nil (i.e. you have given a
     prefix argument), the current environment is modified and no new
     environment is inserted.

   As a default selection, AUCTeX will suggest the environment last
inserted or, as the first choice the value of the variable
`LaTeX-default-environment'.

 - User Option: LaTeX-default-environment
     Default environment to insert when invoking `LaTeX-environment'
     first time.

   If the document is empty, or the cursor is placed at the top of the
document, AUCTeX will default to insert a `document' environment.

   Most of these are described further in the following sections, and
you may easily specify more.  *Note Customizing environments::.

* Menu:

* Equations::                   Equations
* Floats::                      Floats
* Itemize-like::                Itemize-like
* Tabular-like::                Tabular-like
* Customizing environments::    Customizing environments

   You can close the current environment with `C-c ]', but we suggest
that you use `C-c C-e' to insert complete environments instead.

 - Command: LaTeX-close-environment
     (`C-c ]') Insert an `\end' that matches the current environment.


File: auctex.info,  Node: Equations,  Next: Floats,  Up: Environments

Equations
---------

When inserting equation-like environments, the `\label' will have a
default prefix, which is controlled by the following variables:

 - User Option: LaTeX-equation-label
     Prefix to use for `equation' labels.

 - User Option: LaTeX-eqnarray-label
     Prefix to use for `eqnarray' labels.

 - User Option: LaTeX-amsmath-label
     Prefix to use for amsmath equation labels.  Amsmath equations
     include `align', `alignat', `xalignat', `aligned', `flalign' and
     `gather'.


File: auctex.info,  Node: Floats,  Next: Itemize-like,  Prev: Equations,  Up: Environments

Floats
------

Figures and tables (i.e., floats) may also be inserted using AUCTeX.
After choosing either `figure' or `table' in the environment list
described above, you will be prompted for a number of additional things.

FLOAT POSITION
     This is the optional argument of float environments that controls
     how they are placed in the final document.  In LaTeX this is a
     sequence of the letters `htbp' as described in the LaTeX manual.
     The value will default to the value of `LaTeX-float'.

CAPTION
     This is the caption of the float.

LABEL
     The label of this float.  The label will have a default prefix,
     which is controlled by the variables `LaTeX-figure-label' and
     `LaTeX-table-label'.

   Moreover, you will be asked if you want the contents of the float
environment to be horizontally centered.  Upon a positive answer a
`\centering' macro will be inserted at the beginning of the float
environment.

 - User Option: LaTeX-float
     Default placement for floats.

 - User Option: LaTeX-figure-label
     Prefix to use for figure labels.

 - User Option: LaTeX-table-label
     Prefix to use for table labels.


File: auctex.info,  Node: Itemize-like,  Next: Tabular-like,  Prev: Floats,  Up: Environments

Itemize-like
------------

In an itemize-like environment, nodes (i.e., `\item's) may be inserted
using `C-c <LFD>'.

 - Command: LaTeX-insert-item
     (`C-c <LFD>') Close the current item, move to the next line and
     insert an appropriate `\item' for the current environment. That is,
     `itemize' and `enumerate' will have `\item ' inserted, while
     `description' will have `\item[]' inserted.


File: auctex.info,  Node: Tabular-like,  Next: Customizing environments,  Prev: Itemize-like,  Up: Environments

Tabular-like
------------

When inserting Tabular-like environments, that is, `tabular' `array'
etc., you will be prompted for a template for that environment.
Related variables:

 - User Option: LaTeX-default-format
     Default format string for array and tabular environments.

 - User Option: LaTeX-default-position
     Default position string for array and tabular environments.  If
     nil, act like the empty string is given, but don't prompt for a
     position.


File: auctex.info,  Node: Customizing environments,  Prev: Tabular-like,  Up: Environments

Customizing environments
------------------------

*Note Adding Environments::, for how to customize the list of known
environments.


File: auctex.info,  Node: Advanced Features,  Next: Display,  Prev: Frequently Used Commands,  Up: Top

Advanced Editing Features
*************************

The previous chapter described how to write the main body of the text
easily and with a minimum of errors.  In this chapter we will describe
some features for entering more specialized sorts of text, for
formatting the source by indenting and filling and for navigating
through the document.

* Menu:

* Mathematics::                 Entering Mathematics
* Completion::                  Completion of macros
* Commenting::                  Commenting text
* Indenting::                   Reflecting syntactic constructs with whitespace
* Filling::                     Automatic and manual line breaking


File: auctex.info,  Node: Mathematics,  Next: Completion,  Up: Advanced Features

Entering Mathematics
====================

TeX is written by a mathematician, and has always contained good
support for formatting mathematical text.  AUCTeX supports this
tradition, by offering a special minor mode for entering text with many
mathematical symbols.  You can enter this mode by typing `C-c ~'.

 - Command: LaTeX-math-mode
     (`C-c ~') Toggle LaTeX-math-mode.  This is a minor mode rebinding
     the key `LaTeX-math-abbrev-prefix' to allow easy typing of
     mathematical symbols.  ``' will read a character from the keyboard,
     and insert the symbol as specified in `LaTeX-math-list'.  If given
     a prefix argument, the symbol will be surrounded by dollar signs.

   You can use another prefix key (instead of ``') by  setting the
variable `LaTeX-math-abbrev-prefix'.

   To enable LaTeX-math-mode by default, add the following in your
`.emacs' file:
     (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

 - User Option: LaTeX-math-abbrev-prefix
     A string containing the prefix of `LaTeX-math-mode' commands; This
     value defaults to ``'.

   The variable `LaTeX-math-list' holds the actual mapping.

 - User Option: LaTeX-math-list
     A list containing key command mappings to use in `LaTeX-math-mode'.
     The car of each element is the key and the cdr is the macro name.

 - User Option: LaTeX-math-menu-unicode
     Whether the LaTeX menu should try using Unicode for effect.  Your
     Emacs built must be able to display include Unicode characters in
     menus for this feature.

   AUCTeX's reference card `tex-ref.tex' includes a list of all math
mode commands.


File: auctex.info,  Node: Completion,  Next: Commenting,  Prev: Mathematics,  Up: Advanced Features

Completion
==========

Emacs lisp programmers probably know the `lisp-complete-symbol'
command, usually bound to `M-<TAB>'.  Users of the wonderful ispell
mode know and love the `ispell-complete-word' command from that
package.  Similarly, AUCTeX has a `TeX-complete-symbol' command,
usually bound to `M-<TAB>'.  Using `LaTeX-complete-symbol' makes it
easier to type and remember the names of long LaTeX macros.

   In order to use `TeX-complete-symbol', you should write a backslash
and the start of the macro.  Typing `M-<TAB>' will now complete as much
of the macro, as it unambiguously can.  For example, if you type
``\renewc'' and then `M-<TAB>', it will expand to ``\renewcommand''.

 - Command: TeX-complete-symbol
     (`M-<TAB>')  Complete TeX symbol before point.

   A more direct way to insert a macro is with `TeX-insert-macro',
bound to `C-c C-m'.  It has the advantage over completion that it knows
about the argument of most standard LaTeX macros, and will prompt for
them.  It also knows about the type of the arguments, so it will for
example give completion for the argument to `\include'.  Some examples
are listed below.

 - Command: TeX-insert-macro
     (`C-c C-m' or `C-c RET') Prompt (with completion) for the name of
     a TeX macro, and if AUCTeX knows the macro, prompt for each
     argument.

   As a default selection, AUCTeX will suggest the macro last inserted
or, as the first choice the value of the variable `TeX-default-macro'.

 - User Option: TeX-insert-macro-default-style
     Specifies whether `TeX-insert-macro' will ask for all optional
     arguments.

     If set to the symbol `show-optional-args', `TeX-insert-macro' asks
     for optional arguments of TeX macros.  If set to
     `mandatory-args-only', `TeX-insert-macro' asks only for mandatory
     arguments.  When `TeX-insert-macro' is called with prefix argument
     (`C-u'), it's the other way round.

     Note that for some macros, there are special mechanisms, e.g.
     `LaTeX-includegraphics-options-alist'.


 - User Option: TeX-default-macro
     Default macro to insert when invoking `TeX-insert-macro' first
     time.

   A faster alternative is to bind the function `TeX-electric-macro' to
`\'.  This can be done by setting the variable `TeX-electric-escape'

 - User Option: TeX-electric-escape
     If this is non-nil when AUCTeX is loaded, the TeX escape character
     `\' will be bound to `TeX-electric-macro'

   The difference between `TeX-insert-macro' and `TeX-electric-macro'
is that space will complete and exit from the minibuffer in
`TeX-electric-macro'.  Use <TAB> if you merely want to complete.

 - Command: TeX-electric-macro
     Prompt (with completion) for the name of a TeX macro, and if
     AUCTeX knows the macro, prompt for each argument.  Space will
     complete and exit.

   By default AUCTeX will put an empty set braces `{}' after a macro
with no arguments to stop it from eating the next whitespace.  This can
be stopped by entering `LaTeX-math-mode', *note Mathematics::, or by
setting `TeX-insert-braces' to nil.

 - User Option: TeX-insert-braces
     If non-nil, append a empty pair of braces after inserting a macro.

   Completions work because AUCTeX can analyze TeX files, and store
symbols in emacs lisp files for later retrieval.  *Note Automatic::, for
more information.

   AUCTeX will also make completion for many macro arguments, for
example existing labels when you enter a `\ref' macro with
`TeX-insert-macro' or `TeX-electric-macro', and BibTeX entries when you
enter a `\cite' macro.  For this kind of completion to work, parsing
must be enabled as described in *note Parsing Files::.  For `\cite' you
must also make sure that the BibTeX files have been saved at least once
after you enabled automatic parsing on save, and that the basename of
the BibTeX file does not conflict with the basename of one of TeX files.


File: auctex.info,  Node: Commenting,  Next: Indenting,  Prev: Completion,  Up: Advanced Features

Commenting
==========

It is often necessary to comment out temporarily a region of TeX or
LaTeX code.  This can be done with the commands `C-c ;' and `C-c %'.
`C-c ;' will comment out all lines in the current region, while `C-c %'
will comment out the current paragraph.  Type `C-c ;' again to
uncomment all lines of a commented region, or `C-c %' again to
uncomment all comment lines around point.  These commands will insert
or remove a single `%' respectively.

 - Command: TeX-comment-or-uncomment-region
     (`C-c ;') Add or remove `%' from the beginning of each line in the
     current region.  Uncommenting works only if the region encloses
     solely commented lines.  If AUCTeX should not try to guess if the
     region should be commented or uncommented the commands
     `TeX-comment-region' and `TeX-uncomment-region' can be used to
     explicitly comment or uncomment the region in concern.

 - Command: TeX-comment-or-uncomment-paragraph
     (`C-c %') Add or remove `%' from the beginning of each line in the
     current paragraph.  When removing `%' characters the paragraph is
     considered to consist of all preceding and succeeding lines
     starting with a `%', until the first non-comment line.


File: auctex.info,  Node: Indenting,  Next: Filling,  Prev: Commenting,  Up: Advanced Features

Indenting
=========

Indentation means the addition of whitespace at the beginning of lines
to reflect special syntactical constructs.  This makes it easier to see
the structure of the document, and to catch errors such as a missing
closing brace.  Thus, the indentation is done for precisely the same
reasons that you would indent ordinary computer programs.

   Indentation is done by LaTeX environments and by TeX groups, that is
the body of an environment is indented by the value of
`LaTeX-indent-level' (default 2).  Also, items of an `itemize-like'
environment are indented by the value of `LaTeX-item-indent', default
-2.  If more environments are nested, they are indented `accumulated'
just like most programming languages usually are seen indented in
nested constructs.

   You can explicitely indent single lines, usually by pressing <TAB>,
or marked regions by calling `indent-region' on it.  If you have
`auto-fill-mode' enabled and a line is broken while you type it, Emacs
automatically cares about the indentation in the following line.  If
you want to have a similar behavior upon typing <RET>, you can
customize the variable `TeX-newline-function' and change the default of
`newline' which does no indentation to `newline-and-indent' which
indents the new line or `reindent-then-newline-and-indent' which
indents both the current and the new line.

   There are certain LaTeX environments which should be indented in a
special way, like `tabular' or `verbatim'.  Those environments may be
specified in the variable `LaTeX-indent-environment-list' together with
their special indentation functions.  Taking the `verbatim' environment
as an example you can see that `current-indentation' is used as the
indentation function.  This will stop AUCTeX from doing any indentation
in the environment if you hit <TAB> for example.

   There are environments in `LaTeX-indent-environment-list' which do
not bring a special indentation function with them.  This is due to the
fact that first the respective functions are not implemented yet and
second that filling will be disabled for the specified environments.
This shall prevent the source code from being messed up by accidently
filling those environments with the standard filling routine.  If you
think that providing special filling routines for such environments
would be an appropriate and challenging task for you, you are invited to
contribute. (*Note Filling::, for further information about the filling
functionality)

   The check for the indentation function may be enabled or disabled by
customizing the variable `LaTeX-indent-environment-check'.

   As a side note with regard to formatting special environments: Newer
Emacsen include `align.el' and therefore provide some support for
formatting `tabular' and `tabbing' environments with the function
`align-current' which will nicely align columns in the source code.

   AUCTeX is able to format commented parts of your code just as any
other part.  This means LaTeX environments and TeX groups in comments
will be indented syntactically correct if the variable
`LaTeX-syntactic-comments' is set to t.  If you disable it, comments
will be filled like normal text and no syntactic indentation will be
done.

   Following you will find a list of most commands and variables related
to indenting with a small summary in each case:

`<TAB>'
     `LaTeX-indent-line' will indent the current line.

`<LFD>'
     `newline-and-indent' inserts a new line (much like <RET>) and
     moves the cursor to an appropriate position by the left margin.

     Most keyboards nowadays don't have a linefeed key and `C-j' is
     tedious to type.  Therefore you can customize AUCTeX to perform
     indentation (or to make coffee) upon typing <RET> as well.  The
     respective option is called `TeX-newline-function'.

`C-j'
     Alias for <LFD>

 - User Option: LaTeX-indent-environment-list
     List of environments with special indentation.  The second element
     in each entry is the function to calculate the indentation level in
     columns.

     The filling code currently cannot handle tabular-like environments
     which will be completely messed-up if you try to format them.
     This is why most of these environments are included in this
     customization option without a special indentation function.  This
     will prevent that they get filled.

 - User Option: LaTeX-indent-level
     Number of spaces to add to the indentation for each `\begin' not
     matched by a `\end'.

 - User Option: LaTeX-item-indent
     Number of spaces to add to the indentation for `\item''s in list
     environments.

 - User Option: TeX-brace-indent-level
     Number of spaces to add to the indentation for each `{' not
     matched by a `}'.

 - User Option: LaTeX-syntactic-comments
     If non-nil comments will be filled and indented according to LaTeX
     syntax.  Otherwise they will be filled like normal text.

 - User Option: TeX-newline-function
     Used to specify the function which is called when <RET> is pressed.
     This will normally be `newline' which simply inserts a new line.
     In case you want to have AUCTeX do indentation as well when you
     press <RET>, use the built-in functions `newline-and-indent' or
     `reindent-then-newline-and-indent'.  The former inserts a new line
     and indents the following line, i.e. it moves the cursor to the
     right position and therefore acts as if you pressed <LFD>.  The
     latter function additionally indents the current line.  If you
     choose `Other', you can specify your own fancy function to be
     called when <RET> is pressed.


File: auctex.info,  Node: Filling,  Prev: Indenting,  Up: Advanced Features

Filling
=======

Filling deals with the insertion of line breaks to prevent lines from
becoming wider than what is specified in `fill-column'.  The linebreaks
will be inserted automatically if `auto-fill-mode' is enabled.  In this
case the source is not only filled but also indented automatically as
you write it.

   `auto-fill-mode' can be enabled for AUCTeX by calling
`turn-on-auto-fill' in one of the hooks AUCTeX is running.  For all
text modes with `text-mode-hook', for all AUCTeX modes with
`TeX-mode-hook' or for specific modes with `plain-TeX-mode-hook',
`LaTeX-mode-hook', `ConTeXt-mode-hook' or `docTeX-mode-hook'.  As an
example, if you want to enable `auto-fill-mode' in `LaTeX-mode', put the
following into your init file:

     (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)

   You can manually fill explicitely marked regions, paragraphs,
environments, complete sections, or the whole buffer.  (Note that manual
filling in AUCTeX will indent the start of the region to be filled in
contrast to many other Emacs modes.)

   There are some syntactical constructs which are handled specially
with regard to filling.  These are so-called code comments and paragraph
commands.

   Code comments are comments preceded by code or text in the same line.
Upon filling a region, code comments themselves will not get filled.
Filling is done from the start of the region to the line with the code
comment and continues after it.  In order to prevent overfull lines in
the source code, a linebreak will be inserted before the last
non-comment word by default.  This can be changed by customizing
`LaTeX-fill-break-before-code-comments'.  If you have overfull lines
with code comments you can fill those explicitely by calling
`LaTeX-fill-paragraph' or pressing `M-q' with the cursor positioned on
them.  This will add linebreaks in the comment and indent subsequent
comment lines to the column of the comment in the first line of the
code comment.  In this special case `M-q' only acts on the current line
and not on the whole paragraph.

   Lines with `\par' are treated similarly to code comments, i.e.
`\par' will be treated as paragraph boundary which should not be
followed by other code or text.  But it is not treated as a real
paragraph boundary like an empty line where filling a paragraph would
stop.

   Paragraph commands like `\section' or `\noindent' (the list of
commands is defined by `LaTeX-paragraph-commands') are often to be
placed in their own line(s).  This means they should not be consecuted
with any preceding or following adjacent lines of text.  AUCTeX will
prevent this from happening if you do not put any text except another
macro after the end of the last brace of the respective macro.  If
there is other text after the macro, AUCTeX regards this as a sign that
the macro is part of the following paragraph.

   Here are some examples:

     \begin{quote}
       text text text text

     \begin{quote}\label{foo}
       text text text text

   If you press `M-q' on the first line in both examples, nothing will
change.  But if you write

     \begin{quote} text
       text text text text

   and press `M-q', you will get

     \begin{quote} text text text text text

   Besides code comments and paragraph commands, another speciality of
filling in AUCTeX involves commented lines.  You should be aware that
these comments are treated as islands in the rest of the LaTeX code if
syntactic filling is enabled.  This means, for example, if you try to
fill an environment with `LaTeX-fill-environment' and have the cursor
placed on a commented line which does not have a surrounding
environment inside the comment, AUCTeX will report an error.

   The relevant commands and variables with regard to filling are:

`C-c C-q C-p'
     `LaTeX-fill-paragraph' will fill and indent the current paragraph.

`M-q'
     Alias for `C-c C-q C-p'

`C-c C-q C-e'
     `LaTeX-fill-environment' will fill and indent the current
     environment.  This may e.g. be the `document' environment, in
     which case the entire document will be formatted.

`C-c C-q C-s'
     `LaTeX-fill-section' will fill and indent the current logical
     sectional unit.

`C-c C-q C-r'
     `LaTeX-fill-region' will fill and indent the current region.

`M-g'
     Alias for `C-c C-q C-r'

 - User Option: LaTeX-fill-break-at-separators
     List of separators before or after which respectively linebreaks
     will be inserted if they do not fit into one line.  The separators
     can be curly braces, brackets, switches for inline math (`$', `\(',
     `\)') and switches for display math (`\[', `\]').  Such formatting
     can be useful to make macros and math more visible or to prevent
     overfull lines in the LaTeX source in case a package for
     displaying formatted TeX output inside the Emacs buffer, like
     preview-latex, is used.

 - User Option: LaTeX-fill-break-before-code-comments
     Code comments are comments preceded by some other text in the same
     line.  When a paragraph containing such a comment is to be filled,
     the comment start will be seen as a border after which no line
     breaks will be inserted in the same line.  If the option
     `LaTeX-fill-break-before-code-comments' is enabled (which is the
     default) and the comment does not fit into the line, a line break
     will be inserted before the last non-comment word to minimize the
     chance that the line becomes overfull.


File: auctex.info,  Node: Display,  Next: Running TeX and friends,  Prev: Advanced Features,  Up: Top

Controlling the Display of Source Code
**************************************

It is often desirable to get visual help of what markup code in a text
actually does whithout having to decipher it explicitely.  For this
purpose Emacs and AUCTeX provide font locking (also known as syntax
highlighting) which visually sets off markup code like macros or
environments by using different colors or fonts.  For example text to be
typeset in italics can be displayed with an italic font in the editor as
well, or labels and references get their own distinct color.

   While font locking helps you grasp the purpose of markup code and
separate markup from content, the markup code can still be distracting.
AUCTeX lets you hide those parts and show them again at request with
its built-in support for hiding macros and environments which we call
folding here.

   Besides folding of macros and environments, AUCTeX provides support
for Emacs' outline mode which lets you narrow the buffer content to
certain sections of your text by hiding the parts not belonging to these
sections.

* Menu:

* Font Locking::                Font Locking
* Folding::                     Folding Macros and Environments
* Outline::                     Outlining the Document


File: auctex.info,  Node: Font Locking,  Next: Folding,  Up: Display

Font Locking
============

Font locking is supposed to improve readability of the source code by
highlighting certain keywords with different colors or fonts.  It
thereby lets you recognize the function of markup code to a certain
extent without having to read the markup command.  For general
information on controlling font locking with Emacs' font lock mode, see
*Note Font Lock Mode: (emacs)Font Lock.

 - User Option: TeX-install-font-lock
     Once font locking is enabled globally or for the major modes
     provided by AUCTeX, the font locking patterns and functionality of
     font-latex are activated by default.  You can switch to a
     different font locking scheme or disable font locking in AUCTeX by
     customizing the variable `TeX-install-font-lock'.

     Besides font-latex AUCTeX ships with a scheme which is derived
     from Emacs' default LaTeX mode and activated by choosing
     `tex-font-setup'.  Be aware that this scheme is not coupled with
     AUCTeX's style system and not the focus of development.  Therefore
     and due to font-latex being much more feature-rich the following
     explanations will only cover font-latex.

     In case you want to hook in your own fontification scheme, you can
     choose `other' and insert the name of the function which sets up
     your font locking patterns.  If you want to disable fontification
     in AUCTeX completely, choose `ignore'.

   font-latex provides many options for customization which are
accessible with `M-x customize-group RET font-latex RET'.  For this
description the various options are explained in conceptional groups.

Macros
======

Highlighting of macros can be customized by adapting keyword lists which
can be found in the customization group `font-latex-keywords'.  The
lists contain names of macros without the leading backslash.

   Three types of macros can be handled differently with respect to
fontification:

  1. Commands of the form `\foo[bar]{baz}' which consist of the macro
     itself, optional arguments in square brackets and mandatory
     arguments in curly braces.  For the command itself the face
     `font-lock-keyword-face' will be used and for the optional
     arguments the face `font-lock-variable-name-face'.  The face
     applied to the mandatory argument depends on the macro class
     represented by the respective built-in variables.

  2. Declaration macros of the form `{\foo text}' which consist of the
     macro which may be enclosed in a TeX group together with text to be
     affected by the macro.  In case a TeX group is present, the macro
     will get the face `font-lock-keyword-face' and the text will get
     the face configured for the respective macro class.  If no TeX
     group is present, the latter face will be applied to the macro
     itself.

  3. Simple macros of the form `\foo' which do not have any arguments or
     groupings.  The respective face will be applied to the macro
     itself.

General macro classes
---------------------

font-latex provides keyword lists for different macro classes which are
described in the following table:

`font-latex-match-function-keywords'
     Keywords for macros defining or related to functions, like
     `\newcommand'.
     Type: `\macro[...]{...}'
     Face: `font-lock-function-name-face'

`font-latex-match-reference-keywords'
     Keywords for macros defining or related to references, like `\ref'.
     Type: `\macro[...]{...}'
     Face: `font-lock-reference-face'

`font-latex-match-textual-keywords'
     Keywords for macros specifying textual content, like `\caption'.
     Type: `\macro[...]{...}'
     Face: `font-lock-type-face'

`font-latex-match-variable-keywords'
     Keywords for macros defining or related to variables, like
     `\setlength'.
     Type: `\macro[...]{...}{...}'
     Face: `font-lock-variable-name-face'

`font-latex-match-warning-keywords'
     Keywords for important macros, e.g. affecting line or page break,
     like `\clearpage'.
     Type: `\macro'
     Face: `font-latex-warning-face'

Sectioning commands
-------------------

Sectioning commands are macros like `\chapter' or `\section'.  For
these commands there are two fontification schemes which may be
selected by customizing the variable `font-latex-title-fontify'.

 - User Option: font-latex-title-fontify
     Per default sectioning commands will be shown in a larger,
     proportional font, which corresponds to the value `height' for
     this variable.  The font size varies with the sectioning level,
     e.g. `\part' will have a larger font than `\subsection'.
     font-latex provides four different levels.  The respective keyword
     lists are described in the following table.  If you rather like to
     use the base font and a different color, set the variable to
     `color'.  In this case the face `font-lock-type-face' will be used
     to fontify the argument of the command.

`font-latex-match-title-1-keywords'
     Keywords for level 1 sectioning commands.
     Face: `font-latex-title-1-face'

`font-latex-match-title-2-keywords'
     Keywords for level 2 sectioning commands.
     Face: `font-latex-title-2-face'

`font-latex-match-title-3-keywords'
     Keywords for level 3 sectioning commands.
     Face: `font-latex-title-3-face'

`font-latex-match-title-4-keywords'
     Keywords for level 4 sectioning commands.
     Face: `font-latex-title-4-face'

Commands for changing fonts
---------------------------

LaTeX provides various macros for changing fonts or font attributes.
For example, you can select an italic font with `\textit{...}' or bold
with `\textbf{...}'.  An alternative way to specify these fonts is to
use special macros in TeX groups, like `{\itshape ...}' for italics and
`{\bfseries ...}' for bold.  As mentioned above, we call the former
variants commands and the latter declarations.

   Besides the macros for changing fonts provided by LaTeX there is an
infinite number of other macros--either defined by yourself for logical
markup or defined by macro packages--which affect the font in the
typeset text.  While LaTeX's built-in macros and macros of packages
known by AUCTeX are already handled by font-latex, different keyword
lists per type style and macro type are provided for entering your own
macros which are listed in the table below.

`font-latex-match-bold-command-keywords'
     Keywords for commands specifying a bold type style.
     Face: `font-latex-bold-face'

`font-latex-match-italic-command-keywords'
     Keywords for commands specifying an italic font.
     Face: `font-latex-italic-face'

`font-latex-match-math-command-keywords'
     Keywords for commands specifying a math font.
     Face: `font-latex-math-face'

`font-latex-match-type-command-keywords'
     Keywords for commands specifying a typewriter font.
     Face: `font-lock-type-face'

`font-latex-match-bold-declaration-keywords'
     Keywords for declarations specifying a bold type style.
     Face: `font-latex-bold-face'

`font-latex-match-italic-declaration-keywords'
     Keywords for declarations specifying an italic font.
     Face: `font-latex-italic-face'

`font-latex-match-type-declaration-keywords'
     Keywords for declarations specifying a typewriter font.
     Face: `font-latex-type-face'

User-defined keyword classes
----------------------------

In case the customization options explained above do not suffice for
your needs, you can specify your own keyword classes by customizing the
variable `font-latex-user-keyword-classes'.

 - User Option: font-latex-user-keyword-classes
     Every keyword class consists of four parts, a name, a list of
     keywords, a face and a specifier for the type of macros to be
     highlighted.

     When adding new entries, you have to use unique values for the
     class names, i.e. they must not clash with names of the built-in
     keyword classes or other names given by you.  Additionally the
     names must not contain spaces.

     The keywords are names of commands you want to match omitting the
     leading backslash.

     The face argument can either be an existing face or font
     specifications made by you.  (The latter option is not available
     on XEmacs.)

     There are three alternatives for the type of keywords--"Command
     with arguments", "Declaration inside TeX group" and "Command
     without arguments"--which correspond with the macro types
     explained above.

Quotes
======

Text in quotation marks is displayed with the face
`font-latex-string-face'.  Besides the various forms of opening and
closing double and single quotation marks so-called guillemets (<<, >>)
can be used for quoting.  Because there are two styles of using
them--French style: << text >>; German style: >>text<<--you can
customize the variable `font-latex-quotes' to tell font-latex which
type you are using.

 - User Option: font-latex-quotes
     Set the value to `german' if you are using >>German quotes<< and to
     `french' if you are using << French quotes >>.  font-latex will
     recognize the different ways these quotes can be given in your
     source code, i.e. (`"<', `">'), (`<<', `>>') and the respective
     8-bit variants.

Subscript and superscript in math
=================================

In order to make math constructs more readable, font-latex displays
subscript and superscript parts in a smaller font and raised or lowered
respectively.  This fontification feature can be controlled with the
variables `font-latex-fontify-script' and `font-latex-script-display'.

 - User Option: font-latex-fontify-script
     If non-nil, fontify subscript and superscript strings.

     Note that this feature is not available on XEmacs, for whicht it is
     disabled per default.  In GNU Emacs raising and lowering is not
     enabled for versions 21.3 and before due to it working not
     properly.

 - User Option: font-latex-script-display
     Display specification for subscript and superscript content.  The
     car is used for subscript, the cdr is used for superscript.  The
     feature is implemented using so-called display properties.  For
     information on what exactly to specify for the values, see *Note
     Other Display Specifications: (elisp)Other Display Specs.

Verbatim macros and environments
================================

Usually it is not desirable to have content to be typeset verbatim
highlighted according to LaTeX syntax.  Therefore this content will be
fontified uniformly with the face `font-latex-verbatim-face'.

   font-latex differentiates three different types of verbatim
constructs for fontification and consequently provides three keyword
lists for customization.

 - User Option: font-latex-verb-like-commands
     List of commands with the form `\foo|...|' to be fontified as
     verbatim without the leading backslash.  (The delimiters for the
     command's argument can be any character except an asterisk.)

 - User Option: font-latex-verbatim-macros
     List of macros with the form `\foo{...}' to be fontified as
     verbatim without the leading backslash.  In contrast to
     `font-latex-verb-like-commands' the macro's argument is enclosed in
     a TeX group and not two arbitrary characters.

 - User Option: font-latex-verbatim-environments
     List of environments the content of which should be fontified as
     verbatim.

Multi-line fontification
========================

Font locking in LaTeX source code often involves constructs spanning
more than one line of text.  For these constructs to be handled
correctly GNU Emacs as well as font-latex provide mechanisms for
multi-line fontification which can be controlled by the variable
`font-latex-do-multi-line'.

 - User Option: font-latex-do-multi-line
     Control multi-line fontification.

     Setting the variable to t will enable font-latex's mechanism,
     setting it to nil will disable it.  Setting it to `try-font-lock'
     (the default) will use font-lock's mechanism if available and
     font-latex's method if not.

     Setting this variable will only have effect after resetting buffers
     controlled by font-latex or restarting Emacs.

Faces
=====

In case you want to change the colors and fonts used by font-latex
please refer to the faces mentioned in the explanations above and use
`M-x customize-face RET <face> RET'.  All faces defined by font-latex
are accessible through a customization group by typing `M-x
customize-group RET font-latex-highlighting-faces RET'.


File: auctex.info,  Node: Folding,  Next: Outline,  Prev: Font Locking,  Up: Display

Folding Macros and Environments
===============================

There can be macros and environments which have content that is not part
of the text body you are writing, like footnotes and citations.  Those
enclose text which you often only want to see while actually editing it
and which otherwise distract your view of the document body.  Similarly
there are macros where you are not interested in viewing the macro
besides its content but rather want to see the content only, like font
specifiers where the content might already be fontified in a special way
by font locking.

   With AUCTeX's folding functionality you can collapse those items and
replace them by either a fixed string or the content of one of their
arguments instead.  If you want to make the original text visible again
temporarily in order to view or edit it, move point sideways onto the
placeholder (also called display string) or left-click with the mouse
pointer on it.  (The latter is currently only supported on GNU Emacs.)
The macro or environment will unfold automatically, stay open as long as
point is inside of it and collapse again once you move point out of it.
(Note that folding of environments currently does not work in every
AUCTeX mode.)

   In order to use this feature, you have to activate `TeX-fold-mode'
which will activate the auto-reveal feature and the necessary commands
to hide and show macros and environments.  You can activate the mode in
a certain buffer by typing the command `M-x TeX-fold-mode RET' or using
the keyboard shortcut `C-c C-o C-f'.  If you want to use it every time
you edit a LaTeX document, add it to a hook:

     (add-hook 'LaTeX-mode-hook '(lambda ()
                                   (TeX-fold-mode 1)))

   If it should be activated in all AUCTeX modes, use `TeX-mode-hook'
instead of `LaTeX-mode-hook'.

   Once the mode is active there are several commands available to hide
and show macros and environments:

 - Command: TeX-fold-buffer
     (`C-c C-o C-b') Hide all macros specified in the variables
     `TeX-fold-macro-spec-list' and `TeX-fold-env-spec-list'.  This
     command can also be used to refresh the whole buffer and hide any
     new macros and environments which were inserted after the last
     invocation of the command.

 - Command: TeX-fold-region
     (`C-c C-o C-r') Hide all configured macros in the marked region.

 - Command: TeX-fold-paragraph
     (`C-c C-o C-p') Hide all configured macros in the paragraph
     containing point.

 - Command: TeX-fold-macro
     (`C-c C-o C-m') Hide the macro on which point currently is located.
     If the name of the macro is found in `TeX-fold-macro-spec-list',
     the respective display string will be shown instead.  If it is not
     found, the name of the macro in sqare brackets or the default
     string for unspecified macros
     (`TeX-fold-unspec-macro-display-string') will be shown, depending
     on the value of the variable `TeX-fold-unspec-use-name'.

 - Command: TeX-fold-env
     (`C-c C-o C-e') Hide the environment on which point currently is
     located.  The behavior regarding the display string is analogous to
     `TeX-fold-macro' and determined by the variables
     `TeX-fold-env-spec-list' and `TeX-fold-unspec-env-display-string'
     respectively.

 - Command: TeX-fold-clearout-buffer
     (`C-c C-o b') Permanently unfold all macros and environments in the
     current buffer.

 - Command: TeX-fold-clearout-region
     (`C-c C-o r') Permanently unfold all macros and environments in the
     marked region.

 - Command: TeX-fold-clearout-paragraph
     (`C-c C-o p') Permanently unfold all macros and environments in the
     paragraph containing point.

 - Command: TeX-fold-clearout-item
     (`C-c C-o i') Permanently show the macro or environment on which
     point currently is located.  In contrast to temporarily opening the
     macro when point is moved sideways onto it, the macro will be
     permanently unfolded and will not collapse again once point is
     leaving it.

 - Command: TeX-fold-dwim
     (`C-c C-o C-o') Hide or show items according to the current
     context.  If there is folded content, unfold it.  If there is a
     marked region, fold all configured content in this region.  If
     there is no folded content but a macro or environment, fold it.

   The commands above will only take macros or environments into
consideration which are specified in the variable
`TeX-fold-macro-spec-list' or `TeX-fold-env-spec-list' respectively.

 - User Option: TeX-fold-macro-spec-list
     List of display strings or argument numbers and macros to fold.
     If you specify a number, the content of the first mandatory
     argument of a LaTeX macro will be used as the placeholder.

     The placeholder is made by copying the text from the buffer
     together with its properties, i.e. its face as well.  If
     fontification has not happened when this is done (e.g. because of
     lazy font locking) the intended fontification will not show up.
     As a workaround you can leave Emacs idle a few seconds and wait
     for stealth font locking to finish before you fold the buffer.  Or
     you just re-fold the buffer with `TeX-fold-buffer' when you notice
     a wrong fontification.

 - User Option: TeX-fold-env-spec-list
     List of display strings or argument numbers and environments to
     fold.  Argument numbers refer to the `\begin' statement.  That
     means if you have e.g. `\begin{tabularx}{\linewidth}{XXX} ...
     \end{tabularx}' and specify 3 as the argument number, the resulting
     display string will be "XXX".

 - User Option: TeX-fold-unspec-macro-display-string
     Default display string for macros which are not specified in
     `TeX-fold-macro-spec-list'.

 - User Option: TeX-fold-unspec-env-display-string
     Default display string for environments which are not specified in
     `TeX-fold-env-spec-list'.

 - User Option: TeX-fold-unspec-use-name
     If non-nil the name of the macro or environment surrounded by
     square brackets is used as display string, otherwise the defaults
     specified in `TeX-fold-unspec-macro-display-string' or
     `TeX-fold-unspec-env-display-string' respectively.


File: auctex.info,  Node: Outline,  Prev: Folding,  Up: Display

Outlining the Document
======================

AUCTeX supports the standard outline minor mode using LaTeX/ConTeXt
sectioning commands as header lines.  *Note Outline Mode:
(emacs)Outline Mode.

   You can add your own headings by setting the variable
`TeX-outline-extra'.

 - Variable: TeX-outline-extra
     List of extra TeX outline levels.

     Each element is a list with two entries.  The first entry is the
     regular expression matching a header, and the second is the level
     of the header.  A `^' is automatically prepended to the regular
     expressions in the list, so they must match text at the beginning
     of the line.

     See `LaTeX-section-list' or `ConTeXt-INTERFACE-section-list' for
     existing header levels.

   The following example add `\item' and `\bibliography' headers, with
`\bibliography' at the same outline level as `\section', and `\item'
being below `\subparagraph'.

     (setq TeX-outline-extra
           '(("[ \t]*\\\\\\(bib\\)?item\\b" 7)
     	("\\\\bibliography\\b" 2)))

   You may want to check out the unbundled `out-xtra' package for even
better outline support.  It is available from your favorite emacs lisp
archive.


File: auctex.info,  Node: Running TeX and friends,  Next: Multifile,  Prev: Display,  Up: Top

Starting Processors, Viewers and Other Programs
***********************************************

The most powerful features of AUCTeX may be those allowing you to run
(La)TeX/ConTeXt and other external commands like BibTeX and `makeindex'
from within Emacs, viewing and printing the results, and moreover
allowing you to _debug_ your documents.

* Menu:

* Commands::                    Invoking external commands.
* Viewing::                     Invoking external viewers.
* Debugging::                   Debugging TeX and LaTeX output.
* Checking::                    Checking the document.
* Control::                     Controlling the processes.


File: auctex.info,  Node: Commands,  Next: Viewing,  Up: Running TeX and friends

Executing Commands
==================

Formatting the document with TeX, LaTeX or ConTeXt, viewing with a
previewer, printing the document, running BibTeX, making an index, or
checking the document with `lacheck' or `chktex' all require running an
external command.

   There are two ways to run an external command, you can either run it
on all of the current documents with `TeX-command-master', or on the
current region with `TeX-command-region'.  A special case of running
TeX on a region is `TeX-command-buffer' which differs from
`TeX-command-master' if the current buffer is not its own master file.

 - Command: TeX-command-master
     (`C-c C-c')  Query the user for a command, and run it on the master
     file associated with the current buffer.  The name of the master
     file is controlled by the variable `TeX-master'.  The available
     commands are controlled by the variable `TeX-command-list'.

   *Note Installation::, for a discussion about `TeX-command-list' and
*Note Multifile:: for a discussion about `TeX-master'.

 - Command: TeX-command-region
     (`C-c C-r') Query the user for a command, and run it on the "region
     file".  Some commands (typically those invoking TeX or LaTeX) will
     write the current region into the region file, after extracting the
     header and tailer from the master file.  If mark is inactive
     (which can happen with `transient-mark-mode'), use the old region.
     The name of the region file is controlled by the variable
     `TeX-region'.  The name of the master file is controlled by the
     variable `TeX-master'.  The header is all text up to the line
     matching the regular expression `TeX-header-end'.  The trailer is
     all text from the line matching the regular expression
     `TeX-trailer-start'.  The available commands are controlled by the
     variable `TeX-command-list'.

 - Command: TeX-pin-region
     (`C-c C-t C-r') If you don't have a mode like
     `transient-mark-mode' active, where marks get disabled
     automatically, the region would need to get properly set before
     each call to `TeX-command-region'.  If you fix the current region
     with `C-c C-t C-r', then it will get used for more commands even
     though mark and point may change.  An explicitly activated mark,
     however, will always define a new region when calling
     `TeX-command-region'.

 - Command: TeX-command-buffer
     (`C-c C-b') Query the user for a command, and run it on the "region
     file".  Some commands (typically those invoking TeX or LaTeX) will
     write the current buffer into the region file, after extracting the
     header and tailer from the master file.  See above for details.

   AUCTeX will allow one process for each document, plus one process
for the region file to be active at the same time.  Thus, if you are
editing N different documents, you can have N plus one processes
running at the same time.  If the last process you started was on the
region, the commands described in *Note Debugging:: and *Note Control::
will work on that process, otherwise they will work on the process
associated with the current document.

 - User Option: TeX-region
     The name of the file for temporarily storing the text when
     formatting the current region.

 - User Option: TeX-header-end
     A regular expression matching the end of the header.  By default,
     this is `\begin{document}' in LaTeX mode and `%**end of header' in
     TeX mode.

 - User Option: TeX-trailer-start
     A regular expression matching the start of the trailer.  By
     default, this is `\end{document}' in LaTeX mode and `\bye' in TeX
     mode.

   AUCTeX will try to guess what command you want to invoke, but by
default it will assume that you want to run TeX in TeX mode and LaTeX
in LaTeX mode.  You can overwrite this by setting the variable
`TeX-command-default'.

 - User Option: TeX-command-default
     The default command to run in this buffer.  Must be an entry in
     `TeX-command-list'.

   If you want to overwrite the values of `TeX-header-end',
`TeX-trailer-start', or `TeX-command-default', you can do that for all
files by setting them in either `TeX-mode-hook', `plain-TeX-mode-hook',
or `LaTeX-mode-hook'.  To overwrite them for a single file, define them
as file variables (*note File Variables: (emacs)File Variables.).  You
do this by putting special formatted text near the end of the file.

     %%% Local Variables:
     %%% TeX-header-end: "% End-Of-Header"
     %%% TeX-trailer-start: "% Start-Of-Trailer"
     %%% TeX-command-default: "SliTeX"
     %%% End:

   AUCTeX will try to save any buffers related to the document, and
check if the document needs to be reformatted.  If the variable
`TeX-save-query' is non-nil, AUCTeX will query before saving each file.
By default AUCTeX will check emacs buffers associated with files in
the current directory, in one of the `TeX-macro-private' directories,
and in the `TeX-macro-global' directories.  You can change this by
setting the variable `TeX-check-path'.

 - User Option: TeX-check-path
     Directory path to search for dependencies.

     If nil, just check the current file.  Used when checking if any
     files have changed.

 - Command: TeX-PDF-mode
     (`C-c C-t C-p') This command toggles the PDF mode of AUCTeX, a
     buffer-local minor mode.  You can customize `TeX-PDF-mode' to give
     it a different default.  The default is used when AUCTeX does not
     have additional clue about what a document might want.  This
     option usually results in calling either PDFTeX or ordinary TeX.

 - User Option: TeX-DVI-via-PDFTeX
     If this is set, DVI will also be produced by calling PDFTeX,
     setting `\pdfoutput=0'.  This makes it possible to use packages
     like `pdfcprot' even when producing DVI files. Some modern TeX
     distributions, e.g. teTeX 3.0, do this anyway, so that you need
     not enable it within AUCTeX.

 - Command: TeX-interactive-mode
     (`C-c C-t C-i') This command toggles the interactive mode of
     AUCTeX, a global minor mode.  You can customize
     `TeX-interactive-mode' to give it a different default.  In
     interactive mode, TeX will pause with an error prompt when errors
     are encountered and wait for the user to type something.

 - Command: TeX-source-specials-mode
     (`C-c C-t C-s') toggles Source Special support.  Source Specials
     will move the DVI viewer to the location corresponding to point
     (forward search), and it will use `emacsclient' or `gnuclient' to
     have the previewer move Emacs to a location corresponding to a
     control-click in the previewer window.  *Note Viewing::.

     You can permanently activate `TeX-source-specials-mode' with
          (TeX-source-specials-mode 1)
     or by customizing the variable `TeX-source-specials-mode'.  There
     is a bunch of customization options, use `customize-group' on the
     group `TeX-source-specials' to find out more.

     It has to be stressed _very_ strongly however, that Source Specials
     can cause differences in page breaks, in spacing, can seriously
     interfere with various packages and should thus _never_ be used for
     the final version of a document.  In particular, fine-tuning the
     page breaks should be done with Source Specials switched off.

 - Command: TeX-Omega-mode
     (`C-c C-t C-o') This command toggles the use of the Omega  mode of
     AUCTeX, a buffer-local minor mode.  If it is switched on, `omega'
     will be used instead of `tex', and `lambda' instead of `latex'.


File: auctex.info,  Node: Viewing,  Next: Debugging,  Prev: Commands,  Up: Running TeX and friends

Viewing the formatted output
============================

AUCTeX allows you to start external programs for previewing your
document.  These are normally invoked by pressing `C-c C-c' once the
document is formatted or via the respective entry in the Command menu.

   AUCTeX will try to guess which type of viewer (DVI, PostScript or
PDF) has to be used and what options are to be passed over to it.  This
decision is based on the output files present in the working directory
as well as the class and style options used in the document.  For
example, if there is a DVI file in your working directory, a DVI viewer
will be invoked.  In case of a PDF file it will be a PDF viewer.  If
you specified a special paper format like `a5paper' or use the
`landscape' option, this will be passed to the viewer by the
appropriate options.  Especially some DVI viewers depend on this kind
of information in order to display your document correctly.  In case
you are using `pstricks' or `psfrag' in your document, a DVI viewer
cannot display the contents correctly and a PostScript viewer will be
invoked instead.

   The information about which file types and style options are
associated with which viewers and options for them is stored in the
variables `TeX-output-view-style' and `TeX-view-style'.

 - Command: TeX-view
     The command `TeX-view', bound to `C-c C-v', starts a viewer
     without confirmation.  The viewer is started either on a region or
     the master file, depending on the last command issued.  This is
     especially useful for jumping to the location corresponding to
     point in the DVI viewer when using `TeX-source-specials-mode'.

 - User Option: TeX-output-view-style
     List of output file extensions, style options and view options.

 - User Option: TeX-view-style
     List of style options and view options.  This is the predecessor of
     `TeX-output-view-style' which does not allow the specification of
     output file extensions.  It is used as a fallback in case none of
     the alternatives specified in `TeX-output-view-style' match.  In
     case none of the entries in `TeX-view-style' match either, no
     suggestion for a viewer will be made.

Forward and inverse search
--------------------------

You can make use of forward and inverse searching if this is supported
by your DVI viewer and you enabled `TeX-source-specials-mode' as
described in *Note Commands::.  AUCTeX will automatically pass the
necessary command line options to the viewer in order to display the
page containing the content you are currently editing (forward search).
Upon opening the viewer you will be asked if you want to start a server
process (Gnuserv or Emacs server) which is necessary for inverse search.
This happens only if there is no server running already.  You can
customize the variable `TeX-source-specials-view-start-server' to
inhibit the question and always or never start the server respectively.
Once the server and the viewer are running you can use a mouse click in
the viewer to jump to the corresponding part of your document in Emacs
(inverse search).  Refer to the documentation of your viewer to find out
what you have to do exactly.  In xdvi you usually have to use
`C-down-mouse-1'.

 - User Option: TeX-source-specials-view-start-server
     If `TeX-source-specials-mode' is active and a DVI viewer is
     invoked, the default behavior is to ask if a server process should
     be started.  Set this variable to `t' if the question should be
     inhibited and the server should be started always.  Set it to `nil'
     if the server should never be started.  Inverse search will not be
     available in the latter case.


File: auctex.info,  Node: Debugging,  Next: Checking,  Prev: Viewing,  Up: Running TeX and friends

Catching the errors
===================

Once you've formatted your document you may `debug' it, i.e. browse
through the errors (La)TeX reported.

 - Command: TeX-next-error
     (`C-c `')  Go to the next error reported by TeX.  The view will be
     split in two, with the cursor placed as close as possible to the
     error in the top view.  In the bottom view, the error message will
     be displayed along with some explanatory text.

   Normally AUCTeX will only report real errors, but you may as well
ask it to report `bad boxes' as well.

 - Command: TeX-toggle-debug-bad-boxes
     (`C-c C-w')  Toggle whether AUCTeX should stop at bad boxes (i.e.
     over/under full boxes) as well as at normal errors.

   As default, AUCTeX will display that special `*help*' buffer
containing the error reported by TeX along with the documentation.
There is however an `expert' option, which allows you to display the
real TeX output.

 - User Option: TeX-display-help
     When non-nil AUCTeX will automatically display a help text whenever
     an error is encountered using `TeX-next-error' (`C-c `').


File: auctex.info,  Node: Checking,  Next: Control,  Prev: Debugging,  Up: Running TeX and friends

Checking for problems
=====================

Running TeX or LaTeX will only find regular errors in the document, not
examples of bad style.  Furthermore, description of the errors may
often be confusing.  The utility `lacheck' can be used to find style
errors, such as forgetting to escape the space after an abbreviation or
using `...' instead of `\ldots' and many other problems like that.  You
start `lacheck' with `C-c C-c Check <RET>'.  The result will be a list
of errors in the `*compilation*' buffer.  You can go through the errors
with `C-x `' (`next-error', *note Compilation: (emacs)Compilation.),
which will move point to the location of the next error.

   Another newer program which can be used to find errors is `chktex'.
It is much more configurable than `lacheck', but doesn't find all the
problems `lacheck' does, at least in its default configuration.  You
must install the programs before using them, and for `chktex' you must
also modify `TeX-command-list'.  You can get `lacheck' from
`<URL:ftp://ftp.ctan.org/tex-archive/support/lacheck/>' or
alternatively `chktex' from
`<URL:ftp://ftp.ctan.org/tex-archive/support/chktex/>'.  Search for
`chktex' in `tex.el' to see how to switch between them.


File: auctex.info,  Node: Control,  Prev: Checking,  Up: Running TeX and friends

Controlling the output
======================

A number of commands are available for controlling the output of an
application running under AUCTeX

 - Command: TeX-kill-job
     (`C-c C-k')  Kill currently running external application.  This
     may be either of TeX, LaTeX, previewer, BibTeX, etc.

 - Command: TeX-recenter-output-buffer
     (`C-c C-l')  Recenter the output buffer so that the bottom line is
     visible.

 - Command: TeX-home-buffer
     (`C-c ^') Go to the `master' file in the document associated with
     the current buffer, or if already there, to the file where the
     current process was started.


File: auctex.info,  Node: Multifile,  Next: Parsing Files,  Prev: Running TeX and friends,  Up: Top

Multifile Documents
*******************

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 (*note Outline::)).  This can be done by
having a "master" file in which you include the various files with the
TeX macro `\input' or the LaTeX macro `\include'.  These files may also
include other files themselves.  However, to format the document you
must run the commands on the top level master file.

   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 `.emacs' file AUCTeX will use a more advanced
algorithm.

     (setq-default TeX-master nil) ; Query for master file.

   If AUCTeX finds the line indicating the end of the header in a master
file (`TeX-header-end'), 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
(*note File Variables: (emacs)File Variables.).  You can also insert
the file variable yourself, by putting the following text at the end of
your files.

     %%% Local Variables:
     %%% TeX-master: "master"
     %%% End:

   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 `TeX-master' in your `.emacs' file.

     (setq-default TeX-master "master") ; All master files called "master".

 - User Option: TeX-master
     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.

     If this variable is `nil', AUCTeX will query you for the name.

     If the variable is `t', then AUCTeX will assume the file is a
     master file itself.

     If the variable is `shared', then AUCTeX will query for the name,
     but will not change the file.

 - User Option: TeX-one-master
     Regular expression matching ordinary TeX files.

     You should set this variable to match the name of all files, for
     which it is a good idea to append a `TeX-master' 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.

     If you dislike AUCTeX automatically modifying your files, you can
     set this variable to `"<none>"'.  By default, AUCTeX will modify
     any file with an extension of `.tex'.

 - Command: TeX-master-file-ask
     (`C-c _') Query for the name of a master file and add the
     respective File Variables (*note File Variables: (emacs)File
     Variables.) to the file for setting this variable permanently.

     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.

   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 `auto' 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
`auto' directory.  When you load a file, AUCTeX will read the
information in the `auto' directory about the file you loaded _and the
master file specified by `TeX-master'_.  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.

   AUCTeX will create the `auto' directory automatically if
`TeX-auto-save' 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.  *Note Automatic Local::.

 - Command: TeX-save-document
     (`C-c C-d') Save all buffers known to belong to the current
     document.

 - User Option: TeX-save-query
     If non-nil, then query the user before saving each file with
     `TeX-save-document'.


File: auctex.info,  Node: Parsing Files,  Next: I18n,  Prev: Multifile,  Up: Top

Automatic Parsing of TeX files
******************************

AUCTeX depends heavily on being able to extract information from the
buffers by parsing them.  Since parsing the buffer can be somewhat slow,
the parsing is initially disabled.  You are encouraged to enable them by
adding the following lines to your `.emacs' file.

     (setq TeX-parse-self t) ; Enable parse on load.
     (setq TeX-auto-save t) ; Enable parse on save.

   The latter command will make AUCTeX store the parsed information in
an `auto' subdirectory in the directory each time the TeX files are
stored, *note Automatic Local::.  If AUCTeX finds the pre-parsed
information when loading a file, it will not need to reparse the buffer.
The information in the `auto' directory is also useful for multifile
documents *note Multifile::, since it allows each file to access the
parsed information from all the other files in the document.  This is
done by first reading the information from the master file, and then
recursively the information from each file stored in the master file.

   The variables can also be done on a per file basis, by changing the
file local variables.

     %%% Local Variables:
     %%% TeX-parse-self: t
     %%% TeX-auto-save: t
     %%% End:

   Even when you have disabled the automatic parsing, you can force the
generation of style information by pressing `C-c C-n'.  This is often
the best choice, as you will be able to decide when it is necessary to
reparse the file.

 - User Option: TeX-parse-self
     Parse file after loading it if no style hook is found for it.

 - User Option: TeX-auto-save
     Automatically save style information when saving the buffer.

 - Command: TeX-normal-mode ARG
     (`C-c C-n') Remove all information about this buffer, and apply the
     style hooks again.  Save buffer first including style information.
     With optional argument, also reload the style hooks.

   When AUCTeX saves your buffer, it can optionally convert all tabs in
your buffer into spaces.  Tabs confuse AUCTeX's error message parsing
and so should generally be avoided.  However, tabs are significant in
some environments, and so by default AUCTeX does not remove them.  To
convert tabs to spaces when saving a buffer, insert the following in
your `.emacs' file:

     (setq TeX-auto-untabify t)

 - User Option: TeX-auto-untabify
     Automatically remove all tabs from a file before saving it.

   Instead of disabling the parsing entirely, you can also speed it
significantly up by limiting the information it will search for (and
store) when parsing the buffer.  You can do this by setting the default
values for the buffer local variables `TeX-auto-regexp-list' and
`TeX-auto-parse-length' in your `.emacs' file.

     ;; Only parse \documentstyle information.
     (setq-default TeX-auto-regexp-list 'LaTeX-auto-minimal-regexp-list)
     ;; The documentstyle command is usually near the beginning.
     (setq-default TeX-auto-parse-length 2000)

   This example will speed the parsing up significantly, but AUCTeX
will no longer be able to provide completion for labels, macros,
environments, or bibitems specified in the document, nor will it know
what files belong to the document.

   These variables can also be specified on a per file basis, by
changing the file local variables.

     %%% Local Variables:
     %%% TeX-auto-regexp-list: TeX-auto-full-regexp-list
     %%% TeX-auto-parse-length: 999999
     %%% End:

 - User Option: TeX-auto-regexp-list
     List of regular expressions used for parsing the current file.

 - User Option: TeX-auto-parse-length
     Maximal length of TeX file that will be parsed.

   The pre-specified lists of regexps are defined below.  You can use
these before loading AUCTeX by quoting them, as in the example above.

 - Constant: TeX-auto-empty-regexp-list
     Parse nothing

 - Constant: LaTeX-auto-minimal-regexp-list
     Only parse documentstyle.

 - Constant: LaTeX-auto-label-regexp-list
     Only parse LaTeX labels.

 - Constant: LaTeX-auto-regexp-list
     Parse common LaTeX commands.

 - Constant: plain-TeX-auto-regexp-list
     Parse common plain TeX commands.

 - Constant: TeX-auto-full-regexp-list
     Parse all TeX and LaTeX commands that AUCTeX can use.


File: auctex.info,  Node: I18n,  Next: Automatic,  Prev: Parsing Files,  Up: Top

Internationalization
********************

There are several problems associated with editing non-English TeX with
GNU Emacs.  Modern versions of GNU Emacs and TeX are usable for
European (Latin, Cyrillic, Greek) based languages, but special versions
of TeX and Emacs are needed for Korean, Japanese, and Chinese.

* Menu:

* European::                    Using AUCTeX with European Languages
* Japanese::                    Japanese TeX


File: auctex.info,  Node: European,  Next: Japanese,  Up: I18n

Using AUCTeX with European Languages
====================================

First you will need a way to write non-ASCII characters.  You can either
use macros, or teach TeX about the ISO character sets.  I prefer the
latter, it has the advantage that the usual standard emacs word
movement and case change commands will work.

   With LaTeX2e, just add `\usepackage[latin1]{inputenc}'.  Other
languages than Western European ones will probably have other encoding
needs.

   To be able to display non-ASCII characters you will need an
appropriate font and a version of GNU Emacs capable of displaying 8-bit
characters (e.g. Emacs 21).  The manner in which this is supported
differs between Emacsen, so you need to take a look at your respective
documentation.

   A compromise is to use an European character set when editing the
file, and convert to TeX macros when reading and writing the files.

`iso-cvt.el'
     Much like `iso-tex.el' but is bundled with Emacs 19.23 and later.

`x-compose.el'
     Similar package bundled with new versions of XEmacs.

`X-Symbol'
     a much more complete package for both Emacs and XEmacs that can
     also handle a lot of mathematical characters and input methods.


   AUCTeX supports style files for several languages.  Each style file
may modify AUCTeX to better support the language, and will run a
language specific hook that will allow you to for example change ispell
dictionary, or run code to change the keyboard remapping.  The
following will for example choose a Danish dictionary for documents
including `\usepackage[danish]{babel}'.  This requires parsing to be
enabled, *note Parsing Files::.

     (add-hook 'TeX-language-dk-hook
     	  (function (lambda () (ispell-change-dictionary "danish"))))

   The following style files are recognized.
`czech'
     Runs style hook `TeX-language-cz-hook'.  Pressing <"> will insert
     `\uv{' and `}' depending on context.

`danish'
     Runs style hook `TeX-language-dk-hook'.  Pressing <"> will insert
     `"`' and `"'' depending on context.

`dutch'
     Runs style hook `TeX-language-nl-hook'.

`german'
`ngerman'
     Runs style hook `TeX-language-de-hook'.  Gives `"' word syntax,
     makes the <"> key insert a literal `"', and pressing it twice will
     give you opening or closing german quotes (`"`' or `"''), if you
     have configured `TeX-open-quote' and `TeX-close-quote'
     accordingly.  *Note Quotes::.

`italian'
     Runs style hook `TeX-language-it-hook'.  Pressing <"> will insert
     `"<' (`LaTeX-italian-open-quote') and `">'
     (`LaTeX-italian-close-quote') depending on context.

`plfonts'
`plhb'
     Runs style hook `TeX-language-pl-hook'.  Gives  `"' word syntax
     and makes the <"> key insert a literal `"'.  Pressing <"> twice
     will insert `"<' or `">' depending on context.

`slovak'
     Runs style hook `TeX-language-sk-hook'.  Pressing <"> will insert
     `\uv{' and `}' depending on context.

`swedish'
     Runs style hook `TeX-language-sv-hook'.  Pressing <"> will insert
     `'''.


File: auctex.info,  Node: Japanese,  Prev: European,  Up: I18n

Japanese TeX
============

To write Japanese text with AUCTeX you need to have versions of TeX and
Emacs that support Japanese.  There exist at least two variants of TeX
for Japanese text (jTeX and pTeX), and AUCTeX can be used with MULE
supported Emacsen.

   To install Japanese support for AUCTeX, copy `tex-jp.el' to AUCTeX
installed directory.  Next two commands will automatically install
contributed files.

     make contrib
     make install-contrib

   See `INSTALL' and `Makefile' for more information.

   To use the Japanese TeX variants, simply enter `japanese-tex-mode',
`japanese-latex-mode', or `japanese-slitex-mode', and everything should
work.  If not, send mail to Shinji Kobayashi
`<koba@flab.fujitsu.co.jp>', who kindly donated the code for supporting
Japanese in AUCTeX.  None of the primary AUCTeX maintainers understand
Japanese, so they can not help you.

   If you usually use AUCTeX in Japanese, setting following variables
is useful.

 - User Option: TeX-default-mode
     Mode to enter for a new file when it can't be determined whether
     the file is plain TeX or LaTeX or what.

     To use Japanese TeX always, set japanese command for example:
          (setq TeX-default-mode 'japanese-latex-mode)

 - User Option: japanese-TeX-command-default
     The default command for TeX-command in japanese TeX mode.

     The default value is `jTeX'.

 - User Option: japanese-LaTeX-command-default
     The default command for TeX-command in japanese LaTeX mode.

     The default value is `jLaTeX'.

 - User Option: japanese-LaTeX-default-style
     The default style/class when creating new japanese LaTeX document.

     The default value is `j-article'.

   See `tex-jp.el' for more information.


File: auctex.info,  Node: Automatic,  Next: Style Files,  Prev: I18n,  Up: Top

Automatic Customization
***********************

Since AUCTeX is so highly customizable, it makes sense that it is able
to customize itself.  The automatic customization consists of scanning
TeX files and extracting symbols, environments, and things like that.

   The automatic customization is done on three different levels.  The
global level is the level shared by all users at your site, and consists
of scanning the standard TeX style files, and any extra styles added
locally for all users on the site.  The private level deals with those
style files you have written for your own use, and use in different
documents.  You may have a `~/lib/TeX/' directory where you store
useful style files for your own use.  The local level is for a specific
directory, and deals with writing customization for the files for your
normal TeX documents.

   If compared with the environment variable `TEXINPUTS', the global
level corresponds to the directories built into TeX.  The private level
corresponds to the directories you add yourself, except for `.', which
is the local level.

* Menu:

* Automatic Global::            Automatic Customization for the Site
* Automatic Private::           Automatic Customization for a User
* Automatic Local::             Automatic Customization for a Directory

   By default AUCTeX will search for customization files in all the
global, private, and local style directories, but you can also set the
path directly.  This is useful if you for example want to add another
person's style hooks to your path.  Please note that all matching files
found in `TeX-style-path' are loaded, and all hooks defined in the
files will be executed.

 - User Option: TeX-style-path
     List of directories to search for AUCTeX style files.  Each must
     end with a slash.

   By default, when AUCTeX searches a directory for files, it will
recursively search through subdirectories.

 - User Option: TeX-file-recurse
     Whether to search TeX directories recursively: nil means do not
     recurse, a positive integer means go that far deep in the directory
     hierarchy, t means recurse indefinitely.

   By default, AUCTeX will ignore files name `.', `..', `SCCS', `RCS',
and `CVS'.

 - User Option: TeX-ignore-file
     Regular expression matching file names to ignore.

     These files or directories will not be considered when searching
     for TeX files in a directory.


File: auctex.info,  Node: Automatic Global,  Next: Automatic Private,  Up: Automatic

Automatic Customization for the Site
====================================

Assuming that the automatic customization at the global level was done
when AUCTeX was installed, your choice is now: will you use it?  If you
use it, you will benefit by having access to all the symbols and
environments available for completion purposes.  The drawback is slower
load time when you edit a new file and perhaps too many confusing
symbols when you try to do a completion.

   You can disable the automatic generated global style hooks by setting
the variable `TeX-auto-global' to nil.

 - User Option: TeX-macro-global
     Directories containing the site's TeX style files.

 - User Option: TeX-style-global
     Directory containing hand generated TeX information.  Must end
     with a slash.

     These correspond to TeX macros shared by all users of a site.

 - User Option: TeX-auto-global
     Directory containing automatically generated information.

     For storing automatic extracted information about the TeX macros
     shared by all users of a site.


File: auctex.info,  Node: Automatic Private,  Next: Automatic Local,  Prev: Automatic Global,  Up: Automatic

Automatic Customization for a User
==================================

You should specify where you store your private TeX macros, so AUCTeX
can extract their information.  The extracted information will go to
the directories listed in `TeX-auto-private'

   Use `M-x TeX-auto-generate' to extract the information.

 - User Option: TeX-macro-private
     Directories where you store your personal TeX macros.  Each must
     end with a slash.

     This defaults to the directories listed in the `TEXINPUTS' and
     `BIBINPUTS' environment variables.

 - User Option: TeX-auto-private
     List of directories containing automatically generated information.
     Must end with a slash.

     These correspond to the personal TeX macros.

 - Command: TeX-auto-generate TEX AUTO
     (`M-x TeX-auto-generate') Generate style hook for TEX and store it
     in AUTO.  If TEX is a directory, generate style hooks for all
     files in the directory.

 - User Option: TeX-style-private
     List of directories containing hand generated information.  Must
     end with a slash.

     These correspond to the personal TeX macros.


File: auctex.info,  Node: Automatic Local,  Prev: Automatic Private,  Up: Automatic

Automatic Customization for a Directory
=======================================

AUCTeX can update the style information about a file each time you save
it, and it will do this if the directory `TeX-auto-local' exist.
`TeX-auto-local' is by default set to `"auto/"', so simply creating an
`auto' directory will enable automatic saving of style information.

   The advantage of doing this is that macros, labels, etc. defined in
any file in a multifile document will be known in all the files in the
document.  The disadvantage is that saving will be slower.  To disable,
set `TeX-auto-local' to nil.

 - User Option: TeX-style-local
     Directory containing hand generated TeX information.  Must end
     with a slash.

     These correspond to TeX macros found in the current directory.

 - User Option: TeX-auto-local
     Directory containing automatically generated TeX information.
     Must end with a slash.

     These correspond to TeX macros found in the current directory.


File: auctex.info,  Node: Style Files,  Next: Changes,  Prev: Automatic,  Up: Top

Writing Your own Style Support
******************************

*Note Automatic::, for a discussion about automatically generated
global, private, and local style files.  The hand generated style files
are equivalent, except that they by default are found in `style'
directories instead of `auto' directories.

* Menu:

* Simple Style::                A Simple Style File
* Adding Macros::               Adding Support for Macros
* Adding Environments::         Adding Support for Environments
* Adding Other::                Adding Other Information
* Hacking the Parser::          Automatic Extraction of New Things

   If you write some useful support for a public TeX style file, please
send it to us.


File: auctex.info,  Node: Simple Style,  Next: Adding Macros,  Up: Style Files

A Simple Style File
===================

Here is a simple example of a style file.

     ;;; book.el - Special code for book style.
     
     (TeX-add-style-hook "book"
      (function (lambda () (setq LaTeX-largest-level
     			    (LaTeX-section-level ("chapter"))))))

   This file specifies that the largest kind of section in a LaTeX
document using the book document style is chapter.  The interesting
thing to notice is that the style file defines an (anonymous) function,
and adds it to the list of loaded style hooks by calling
`TeX-add-style-hook'.

   The first time the user indirectly tries to access some style
specific information, such as the largest sectioning command available,
the style hooks for all files directly or indirectly read by the
current document is executed.  The actual files will only be evaluated
once, but the hooks will be called for each buffer using the style file.

 - Function: TeX-add-style-hook STYLE HOOK
     Add HOOK to the list of functions to run when we use the TeX file
     STYLE.


File: auctex.info,  Node: Adding Macros,  Next: Adding Environments,  Prev: Simple Style,  Up: Style Files

Adding Support for Macros
=========================

The most common thing to define in a style hook is new symbols (TeX
macros).  Most likely along with a description of the arguments to the
function, since the symbol itself can be defined automatically.

   Here are a few examples from `latex.el'.

     (TeX-add-style-hook "latex"
      (function
       (lambda ()
          (TeX-add-symbols
          '("arabic" TeX-arg-counter)
          '("label" TeX-arg-define-label)
          '("ref" TeX-arg-label)
          '("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t)
          '("newtheorem" TeX-arg-define-environment
            [ TeX-arg-environment "Numbered like" ]
            t [ TeX-arg-counter "Within counter" ])))))

 - Function: TeX-add-symbols SYMBOL ...
     Add each SYMBOL to the list of known symbols.

   Each argument to `TeX-add-symbols' is a list describing one symbol.
The head of the list is the name of the symbol, the remaining elements
describe each argument.

   If there are no additional elements, the symbol will be inserted with
point inside braces.  Otherwise, each argument of this function should
match an argument of the TeX macro.  What is done depends on the
argument type.

   If a macro is defined multiple times, AUCTeX will chose the one with
the longest definition (i.e. the one with the most arguments).

   Thus, to overwrite
     	'("tref" 1) ; one argument
   you can specify
     	'("tref" TeX-arg-label ignore) ; two arguments

   `ignore' is a function that does not do anything, so when you insert
a `tref' you will be prompted for a label and no more.

`string'
     Use the string as a prompt to prompt for the argument.

`number'
     Insert that many braces, leave point inside the first.

`nil'
     Insert empty braces.

`t'
     Insert empty braces, leave point between the braces.

`other symbols'
     Call the symbol as a function.  You can define your own hook, or
     use one of the predefined argument hooks.

`list'
     If the car is a string, insert it as a prompt and the next element
     as initial input.  Otherwise, call the car of the list with the
     remaining elements as arguments.

`vector'
     Optional argument.  If it has more than one element, parse it as a
     list, otherwise parse the only element as above.  Use square
     brackets instead of curly braces, and is not inserted on empty user
     input.

   A lot of argument hooks have already been defined.  The first
argument to all hooks is a flag indicating if it is an optional
argument.  It is up to the hook to determine what to do with the
remaining arguments, if any.  Typically the next argument is used to
overwrite the default prompt.

`TeX-arg-conditional'
     Implements if EXPR THEN ELSE.  If EXPR evaluates to true, parse
     THEN as an argument list, else parse ELSE as an argument list.

`TeX-arg-literal'
     Insert its arguments into the buffer.  Used for specifying extra
     syntax for a macro.

`TeX-arg-free'
     Parse its arguments but use no braces when they are inserted.

`TeX-arg-eval'
     Evaluate arguments and insert the result in the buffer.

`TeX-arg-file'
     Prompt for a tex or sty filename, and use it without the
     extension. Run the file hooks defined for it.

`TeX-arg-label'
     Prompt for a label completing with known labels.

`TeX-arg-macro'
     Prompt for a TeX macro with completion.

`TeX-arg-environment'
     Prompt for a LaTeX environment with completion.

`TeX-arg-cite'
     Prompt for a BibTeX citation.

`TeX-arg-counter'
     Prompt for a LaTeX counter.

`TeX-arg-savebox'
     Prompt for a LaTeX savebox.

`TeX-arg-file'
     Prompt for a filename in the current directory, and use it without
     the extension.

`TeX-arg-input-file'
     Prompt for a filename in the current directory, and use it without
     the extension.  Run the style hooks for the file.

`TeX-arg-define-label'
     Prompt for a label completing with known labels.  Add label to
     list of defined labels.

`TeX-arg-define-macro'
     Prompt for a TeX macro with completion.  Add macro to list of
     defined macros.

`TeX-arg-define-environment'
     Prompt for a LaTeX environment with completion.  Add environment to
     list of defined environments.

`TeX-arg-define-cite'
     Prompt for a BibTeX citation.

`TeX-arg-define-counter'
     Prompt for a LaTeX counter.

`TeX-arg-define-savebox'
     Prompt for a LaTeX savebox.

`TeX-arg-corner'
     Prompt for a LaTeX side or corner position with completion.

`TeX-arg-lr'
     Prompt for a LaTeX side with completion.

`TeX-arg-tb'
     Prompt for a LaTeX side with completion.

`TeX-arg-pagestyle'
     Prompt for a LaTeX pagestyle with completion.

`TeX-arg-verb'
     Prompt for delimiter and text.

`TeX-arg-pair'
     Insert a pair of numbers, use arguments for prompt. The numbers are
     surrounded by parentheses and separated with a comma.

`TeX-arg-size'
     Insert width and height as a pair.  No arguments.

`TeX-arg-coordinate'
     Insert x and y coordinates as a pair.  No arguments.

   If you add new hooks, you can assume that point is placed directly
after the previous argument, or after the macro name if this is the
first argument.  Please leave point located after the argument you are
inserting.  If you want point to be located somewhere else after all
hooks have been processed, set the value of `exit-mark'.  It will point
nowhere, until the argument hook sets it.


File: auctex.info,  Node: Adding Environments,  Next: Adding Other,  Prev: Adding Macros,  Up: Style Files

Adding Support for Environments
===============================

Adding support for environments is very much like adding support for
TeX macros, except that each environment normally only takes one
argument, an environment hook.  The example is again a short version of
`latex.el'.

     (TeX-add-style-hook "latex"
      (function
       (lambda ()
         (LaTeX-add-environments
          '("document" LaTeX-env-document)
          '("enumerate" LaTeX-env-item)
          '("itemize" LaTeX-env-item)
          '("list" LaTeX-env-list)))))

   The only hook that is generally useful is `LaTeX-env-item', which is
used for environments that contain items.  It is completely up to the
environment hook to insert the environment, but the function
`LaTeX-insert-environment' may be of some help.  The hook will be
called with the name of the environment as its first argument, and extra
arguments can be provided by adding them to a list after the hook.

   For simple environments with arguments, for example defined with
`\newenvironment', you can make AUCTeX prompt for the arguments by
giving the prompt strings in the call to `LaTeX-add-environments'.  For
example, if you have defined a `loop' environment with the three
arguments FROM, TO, and STEP, you can add support for them in a style
file.

     %% loop.sty
     
     \newenvironment{loop}[3]{...}{...}

     ;; loop.el
     
     (TeX-add-style-hook "loop"
      (function
       (lambda ()
         (LaTeX-add-environments
          '("loop" "From" "To" "Step")))))

   If an environment is defined multiple times, AUCTeX will chose the
one with the longest definition.  Thus, if you have an enumerate style
file, and want it to replace the standard LaTeX enumerate hook above,
you could define an `enumerate.el' file as follows, and place it in the
appropriate style directory.

     (TeX-add-style-hook "latex"
      (function
       (lambda ()
         (LaTeX-add-environments
          '("enumerate" LaTeX-env-enumerate foo)))))
     
     (defun LaTeX-env-enumerate (environment &optional ignore) ...)

   The symbol `foo' will be passed to `LaTeX-env-enumerate' as the
second argument, but since we only added it to overwrite the definition
in `latex.el' it is just ignored.

 - Function: LaTeX-add-environments ENV ...
     Add each ENV to list of loaded environments.

 - Function: LaTeX-insert-environment ENV [ EXTRA ]
     Insert environment of type ENV, with optional argument EXTRA.


File: auctex.info,  Node: Adding Other,  Next: Hacking the Parser,  Prev: Adding Environments,  Up: Style Files

Adding Other Information
========================

You can also specify bibliographical databases and labels in the style
file.  This is probably of little use, since this information will
usually be automatically generated from the TeX file anyway.

 - Function: LaTeX-add-bibliographies BIBLIOGRAPHY ...
     Add each BIBLIOGRAPHY to list of loaded bibliographies.

 - Function: LaTeX-add-labels LABEL ...
     Add each LABEL to the list of known labels.


File: auctex.info,  Node: Hacking the Parser,  Prev: Adding Other,  Up: Style Files

Automatic Extraction of New Things
==================================

The automatic TeX information extractor works by searching for regular
expressions in the TeX files, and storing the matched information.  You
can add support for new constructs to the parser, something that is
needed when you add new commands to define symbols.

   For example, in the file `macro.tex' I define the following macro.

     \newcommand{\newmacro}[5]{%
     \def#1{#3\index{#4@#5~cite{#4}}\nocite{#4}}%
     \def#2{#5\index{#4@#5~cite{#4}}\nocite{#4}}%
     }

   AUCTeX will automatically figure out that `newmacro' is a macro that
takes five arguments.  However, it is not smart enough to automatically
see that each time we use the macro, two new macros are defined.  We
can specify this information in a style hook file.

     ;;; macro.el - Special code for my own macro file.
     
     ;;; Code:
     
     (defvar TeX-newmacro-regexp
       '("\\\\newmacro{\\\\\\([a-zA-Z]+\\)}{\\\\\\([a-zA-Z]+\\)}"
         (1 2) TeX-auto-multi)
       "Matches \newmacro definitions.")
     
     (defvar TeX-auto-multi nil
       "Temporary for parsing \\newmacro definitions.")
     
     (defun TeX-macro-cleanup ()
       ;; Move symbols from `TeX-auto-multi' to `TeX-auto-symbol'.
       (mapcar (function (lambda (list)
     	    (mapcar (function (lambda (symbol)
     		      (setq TeX-auto-symbol
     			    (cons symbol TeX-auto-symbol))))
     		    list)))
     	  TeX-auto-multi))
     
     (defun TeX-macro-prepare ()
       ;; Clear `Tex-auto-multi' before use.
       (setq TeX-auto-multi nil))
     
     (add-hook 'TeX-auto-prepare-hook 'TeX-macro-prepare)
     (add-hook 'TeX-auto-cleanup-hook 'TeX-macro-cleanup)
     
     (TeX-add-style-hook "macro"
      (function
       (lambda ()
         (TeX-auto-add-regexp TeX-newmacro-regexp)
         (TeX-add-symbols '("newmacro"
     		       TeX-arg-macro
     		       (TeX-arg-macro "Capitalized macro: \\")
     		       t
     		       "BibTeX entry: "
     		       nil)))))
     
     ;;; macro.el ends here

   When this file is first loaded, it adds a new entry to
`TeX-newmacro-regexp', and defines a function to be called before the
parsing starts, and one to be called after the parsing is done.  It
also declares a variable to contain the data collected during parsing.
Finally, it adds a style hook which describes the `newmacro' macro, as
we have seen it before.

   So the general strategy is: Add a new entry to `TeX-newmacro-regexp'.
Declare a variable to contain intermediate data during parsing.  Add
hook to be called before and after parsing.  In this case, the hook
before parsing just initializes the variable, and the hook after parsing
collects the data from the variable, and adds them to the list of
symbols found.

 - Variable: TeX-auto-regexp-list
     List of regular expressions matching TeX macro definitions.

     The list has the following format ((REGEXP MATCH TABLE) ...), that
     is, each entry is a list with three elements.

     REGEXP.  Regular expression matching the macro we want to parse.

     MATCH.  A number or list of numbers, each representing one
     parenthesized subexpression matched by REGEXP.

     TABLE.  The symbol table to store the data.  This can be a
     function, in which case the function is called with the argument
     MATCH.  Use `TeX-match-buffer' to get match data.  If it is not a
     function, it is presumed to be the name of a variable containing a
     list of match data.  The matched data (a string if MATCH is a
     number, a list of strings if MATCH is a list of numbers) is put in
     front of the table.

 - Variable: TeX-auto-prepare-hook nil
     List of functions to be called before parsing a TeX file.

 - Variable: TeX-auto-cleanup-hook nil
     List of functions to be called after parsing a TeX file.


File: auctex.info,  Node: Changes,  Next: ToDo,  Prev: Style Files,  Up: Top

Changes and New Features
************************

News in 11.55
=============

   * A bug was fixed which lead to the insertion of trailing whitespace
     during filling.  In particular extra spaces were added to sentence
     endings at the end of lines.  You can make this whitespace visible
     by setting the variable `show-trailing-whitespace' to `t'.  If you
     want to delete all trailing whitespace in a buffer, type `M-x
     delete-trailing-whitespace RET'.

   * A bug was fixed which lead to a `*Compile-Log*' buffer popping up
     when the first LaTeX file was loaded in an Emacs session.

   * On some systems the presence of an outdated Emacspeak package lead
     to the error message `File mode specification error: (error
     "Variable binding depth exceeds max-specpdl-size")'.  Precautions
     were added which prevent this error from happening.  But
     nevertheless, it is advised to upgrade or uninstall the outdated
     Emacspeak package.

   * The value of `TeX-macro-global' is not determined during
     configuration anymore but at load time of AUCTeX.  Consequently the
     associated configuration option `--with-tex-input-dirs' was
     removed.

   * Support for the LaTeX Japanese classes `jsarticle' and `jsbook'
     was added.

News in 11.54
=============

   * The parser (used e.g. for `TeX-auto-generate-global') was extended
     to recognize keywords common in LaTeX packages and classes, like
     "\DeclareRobustCommand" or "\RequirePackage".  Additionally a bug
     was fixed which led to duplicate entries in AUCTeX style files.

   * Folding can now be done for paragraphs and regions besides single
     constructs and the whole buffer.  With the new `TeX-fold-dwim'
     command content can both be hidden and shown with a single key
     binding.  In course of these changes new key bindings for
     unfolding commands where introduced.  The old bindings are still
     present but will be phased out in future releases.

   * Info files of the manual now have a .info extension.

   * There is an experimental toolbar support now.  It is not activated
     by default.  If you want to use it, add
          (add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar)
     to your init file.

   * The manual now contains a new chapter "Quick Start".  It explains
     the main features and how to use them, and should be enough for a
     new user to start using AUCTeX.

   * A new section "Font Locking" was added to the manual which explains
     syntax highlighting in AUCTeX and its customization.  Together with
     the sections related to folding and outlining, the section is part
     of the new chapter "Display".

   * Keywords for syntax highlighting of LaTeX constructs to be typeset
     in bold, italic or typewriter fonts may now be customized.
     Besides the built-in classes, new keyword classes may be added by
     customizing the variable `font-latex-user-keyword-classes'.  The
     customization options can be found in the customization group
     `font-latex-keywords'.

   * Verbatim content is now displayed with the `fixed-pitch' face. (GNU
     Emacs only)

   * Syntax highlighting should not spill out of verbatim content
     anymore. (GNU Emacs only)

   * Verbatim commands like `\verb|...|' will not be broken anymore
     during filling.

   * You can customize the completion for graphic files with
     `LaTeX-includegraphics-read-file'.

   * Support for the LaTeX packages `url', `listings', `jurabib' and
     `csquotes' was added with regard to command completion and syntax
     highlighting.

   * Performance of fontification and filling was improved.

   * Insertion of nodes in Texinfo mode now supports completion of
     existing node names.

   * Setting the variable `LaTeX-float' to `nil' now means that you
     will not be prompted for the float position of figures and tables.
     You can get the old behaviour of `nil' by setting the variable to
     `""', i.e. an empty string.  See also *Note Floats::.

   * The XEmacs-specific bug concerning `overlays-at' was fixed.

   * Lots of bug fixes.

News in 11.53
=============

   * The LaTeX math menu can include Unicode characters if your Emacs
     built supports it.  See the variable `LaTeX-math-menu-unicode',
     *Note Mathematics::.

   * Bug fixes for XEmacs.

   * Completion for graphic files in the TeX search path has been added.

   * `start' is used for the viewer for MikTeX and fpTeX.

   * The variable `TeX-fold-preserve-comments' can now be customized to
     deactivate folding in comments.

News in 11.52
=============

   * Installation and menus under XEmacs work again (maybe for the first
     time).

   * Fontification of subscripts and superscripts is now disabled when
     the fontification engine is not able to support it properly.

   * Bug fixes in the build process.

News in 11.51
=============

   * PDFTeX and Source Special support did not work with ConTeXt, this
     has been fixed.  Similar for Source Special support under Windows.

   * Omega support has been added.

   * Bug fixes in the build process.

   * `TeX-fold' now supports folding of environments in Texinfo mode.

News in 11.50
=============

   * The use of source specials when processing or viewing the document
     can now be controlled with the new `TeX-source-specials' minor mode
     which can be toggled via an entry in the Command menu or the key
     binding `C-c C-t C-s'.  If you have customized the variable
     `TeX-command-list', you have to re-initialize it for this to work.
     This means to open a customization buffer for the variable by
     typing `M-x customize-variable RET TeX-command-list RET', selecting
     "Erase Customization" and do your customization again with the new
     default.

   * The content of the command menu now depends on the mode (plain TeX,
     LaTeX, ConTeXt etc.).  Any former customization of the variable
     `TeX-command-list' has to be erased.  Otherwise the command menu
     and the customization will not work correctly.

   * Support for hiding and auto-revealing macros, e.g. footnotes or
     citations, and environments in a buffer was added, *Note Folding::.

   * You can now control if indentation is done upon typing <RET> by
     customizing the variable `TeX-newline-function', *Note Indenting::.

   * Limited support for `doc.sty' and `ltxdoc.cls' (`dtx' files) was
     added.  The new docTeX mode provides functionality for editing
     documentation parts.  This includes formatting (indenting and
     filling), adding and completion of macros and environments while
     staying in comments as well as syntax highlighting.  (Please note
     that the mode is not finished yet.  For example syntax
     highlighting does not work yet in XEmacs.)

   * For macro completion in docTeX mode the AUCTeX style files
     `doc.el', `ltxdoc.el' and `ltx-base.el' were included.  The latter
     provides general support for low-level LaTeX macros and may be
     used with LaTeX class and style files as well.  It is currently
     not loaded automatically for those files.

   * Support for ConTeXt with a separate ConTeXt mode is now included.
     Macro definitions for completion are available in Dutch and
     English.

   * The filling and indentation code was overhauled and is now able to
     format commented parts of the source syntactically correct.  Newly
     available functionality and customization options are explained in
     the manual.

   * Filling and indentation in XEmacs with preview-latex and activated
     previews lead to the insertion of whitespace before multi-line
     previews.  AUCTeX now contains facilities to prevent this problem.

   * If `TeX-master' is set to `t', AUCTeX will now query for a master
     file only when a new file is opened.  Existing files will be left
     alone.  The new function `TeX-master-file-ask' (bound to `C-c _'
     is provided for adding the variable manually.

   * Sectioning commands are now shown in a larger font on display
     devices which support such fontification.  The variable
     `font-latex-title-fontify' can be customized to restore the old
     appearance, i.e. the usage of a different color instead of a
     change in size.

   * Support for `alphanum.sty', `beamer.cls', `booktabs.sty',
     `captcont.sty', `emp.sty', `paralist.sty', `subfigure.sty' and
     `units.sty'/`nicefrac.sty' was added.  Credits go to the authors
     mentioned in the respective AUCTeX style files.

   * Inserting graphics with `C-c RET \includegraphics RET' was
     improved.  See the variable `LaTeX-includegraphics-options-alist'.

   * If `LaTeX-default-position' is `nil', don't prompt for position
     arguments in Tabular-like environments, see *Note Tabular-like::.

   * Completion for available packages when using `C-c RET \usepackage
     RET' was improved on systems using the kpathsea library.

   * The commenting functionality was fixed.  The separate functions for
     commenting and uncommenting were unified in one function for
     paragraphs and regions respectively which do both.

   * Syntax highlighting can be customized to fontify quotes delimited
     by either >>German<< or <<French>> quotation marks by changing the
     variable `font-latex-quotes'.

   * Certain TeX/LaTeX keywords for functions, references, variables
     and warnings will now be fontified specially.  You may add your own
     keywords by customizing the variables
     `font-latex-match-function-keywords',
     `font-latex-match-reference-keywords',
     `font-latex-match-variable-keywords' and
     `font-latex-match-warning-keywords'.

   * If you include the style files `german' or `ngerman' in a document
     (directly or via the `babel' package), you should now customize
     `LaTeX-german-open-quote', `LaTeX-german-close-quote' and
     `LaTeX-german-quote-after-quote' instead of `TeX-open-quote',
     `TeX-close-quote' and `TeX-quote-after-quote' if you want to
     influence the type of quote insertion.

   * Upon viewing an output file, the right viewer and command line
     options for it are now determined automatically by looking at the
     extension of the output file and certain options used in the
     source file.  The behavior can be adapted or extended respectively
     by customizing the variable `TeX-output-view-style'.

   * You can control whether `TeX-insert-macro' (`C-c RET') ask for all
     optional arguments by customizing the variable
     `TeX-insert-macro-default-style', *Note Completion::.

   * `TeX-run-discard' is now able to completely detach a process that
     it started.

   * The build process was enhanced and is now based on `autoconf'
     making installing AUCTeX a mostly automatic process.  See *Note
     Installation:: and *Note Installation under MS Windows:: for
     details.

News in 11.14
=============

   * Many more LaTeX and LaTeX2e commands are supported.  Done by
     Masayuki Ataka  <ataka@milk.freemail.ne.jp>

News in 11.12
=============

   * Support for the KOMA-Script classes.  Contributed by Mark Trettin
     <Mark.Trettin@gmx.de>.

News in 11.11
=============

   * Support for `prosper.sty', see <http://prosper.sourceforge.net/>.
     Contributed by Phillip Lord <p.lord@russet.org.uk>.

News in 11.10
=============

   * `comment-region' now inserts %% by default.  Suggested by "Davide
     G. M. Salvetti" <salve@debian.org>.

News in 11.06
=============

   * You can now switch between using the `font-latex' (all emacsen),
     the `tex-font' (Emacs 21 only) or no special package for font
     locking.  Customize `TeX-install-font-lock' for this.

News in 11.04
=============

   * Now use -t landscape by default when landscape option appears.
     Suggested by Erik Frisk <frisk@isy.liu.se>.

News in 11.03
=============

   * Use `tex-fptex.el' for fpTeX support.  Contributed by Fabrice
     Popineau <Fabrice.Popineau@supelec.fr>.

News in 11.02
=============

   * New user option `LaTeX-top-caption-list' specifies environments
     where the caption should go at top.  Contributed by
     ataka@milk.freemail.ne.jp (Masayuki Ataka).

   * Allow explicit dimensions in `graphicx.sty'.  Contributed by
     ataka@milk.freemail.ne.jp (Masayuki Ataka).

   * Limited support for `verbatim.sty'.  Contributed by
     ataka@milk.freemail.ne.jp (Masayuki Ataka).

   * Better support for asmmath items.  Patch by
     ataka@milk.freemail.ne.jp (Masayuki Ataka).

   * More accurate error parsing.  Added by David Kastrup
     <David.Kastrup@t-online.de>.

News in 11.01
=============

   * Bug fixes.

Older versions
==============

See the file `history.texi' for older changes.


File: auctex.info,  Node: ToDo,  Next: FAQ,  Prev: Changes,  Up: Top

Future Development
******************

The following sections describe future development of AUCTeX.  Besides
mid-term goals, bug reports and requests we cannot fix or honor right
away are being gathered here.  If you have some time for Emacs Lisp
hacking, you are encouraged to try to provide a solution to one of the
following problems.  If you don't know Lisp, you may help us to improve
the documentation.  It might be a good idea to discuss proposed changes
on the mailing list of AUCTeX first.

* Menu:

* Mid-term Goals::
* Wishlist::
* Bugs::


File: auctex.info,  Node: Mid-term Goals,  Next: Wishlist,  Up: ToDo

Mid-term Goals
==============

   * Integration of preview-latex into AUCTeX

     AUCTeX users will thereby get the functionality provided by
     preview-latex without the hassle of an additional installation.

     Looking at the backend, the integration involves folding of error
     parsing and task management of both packages which will ease
     development efforts and avoid redundant work.

   * More flexible option and command handling

     The current state of command handling with `TeX-command-list' is
     not very flexible because there is no distinction between
     executables and command line options to be passed to them.

     Customization of `TeX-command-list' by the user will interfere with
     updates of AUCTeX.

   * Error help catalogs

     Currently, the help for errors is more or less hardwired into
     `tex.el'.  For supporting error help in other languages, it would
     be sensible to instead arrange error messages in language-specific
     files, make a common info file from all such catalogs in a given
     language and look the error texts up in an appropriate index.  The
     user would then specify a preference list of languages, and the
     errors would be looked up in the catalogs in sequence until the
     were identified.

   * Combining `docTeX' with RefTeX

     Macro cross references should also be usable for document
     navigation using RefTeX.



File: auctex.info,  Node: Wishlist,  Next: Bugs,  Prev: Mid-term Goals,  Up: ToDo

Wishlist
========

   * Spell checking of macros

     A special ispell dictionary for macros could be nice to have.

   * Quick error overviews

     An error overview window (extract from the log file with just the
     error lines, clickable like a "grep" buffer) and/or fringe
     indicators for errors in the main text would be nice.

   * A math entry grid

     A separate frame with a table of math character graphics to click
     on in order to insert the respective sequence into the buffer (cf.
     the "grid" of x-symbol).

   * Crossreferencing support

     It would be nice if you could index process your favorite
     collection of `.dtx' files (such as the LaTeX source), just call a
     command on arbitrary control sequence, and get either the DVI
     viewer opened right at the definition of that macro (using Source
     Specials), or the source code of the `.dtx' file.

   * Better plain TeX support For starters, `LaTeX-math-mode' is not
     very LaTeX-specific in the first place, and similar holds for
     indentation and formatting.

   * Poor man's Source Specials In particular in PDF mode (and where
     Source Specials cause problems), alternatives would be desirable.
     One could implement inverse search by something like Heiko
     Oberdiek's `vpe.sty', and forward search by using the `.aux' file
     info to correlate labels in the text (possibly in cooperation with
     RefTeX) with previewer pages.

   * Page count when compiling should (optionally) go to modeline of the
     window where the compilation command was invoked, instead of the
     output window.  Suggested by Karsten Tinnefeld
     <tinnefeld@irb.informatik.uni-dortmund.de>.

   * Command to insert a macrodefinition in the preamble, without moving
     point from the current location.  Suggested by "Jeffrey C. Ely"
     <ely@nwu.edu>.

   * A database of all commands defined in all stylefiles.  When a
     command or environment gets entered that is provided in one of the
     styles, insert the appropriate `\usepackage' in the preamble.

   * A way to add and overwrite math mode entries in style files, and to
     decide where they should be.  Suggested by Remo Badii
     <Remo.Badii@psi.ch>.

   * Create template for (first) line of tabular environment.

   * I think prompting for the master is the intended behaviour.  It
     corresponds to a `shared' value for TeX-master.

     There should probably be a `none' value which wouldn't query for
     the master, but instead disable all features that relies on
     TeX-master.

     This default value for TeX-master could then be controled with
     mapping based on the extension.

   * Multiple argument completion for `\bibliography'.  In general, I
     ought to make `,' special for these kind of completions.

   * Suggest `makindex' when appropriate.

   * Use index files (when available) to speed up `C-c C-m include
     <RET>'.

   * Option not to calculate very slow completions like for `C-c C-m
     include <RET>'.

   * Font menu should be created from `TeX-font-list'.

   * Installation procedure written purely in emacs lisp.

   * Included PostScript files should also be counted as part of the
     document.

   * The parser should catch warnings about undefined crossreferences.
     Suggested by Richard Hirsch `i3080501@ws.rz.tu-bs.de'.

   * A nice hierarchical by-topic organization of all officially
     documented LaTeX macros, available from the menu bar.

   * `TeX-command-default' should be set from the master file, if not
     set locally.  Suggested by Peter Whaite `<peta@cim.mcgill.ca>'.

   * Make AUCTeX work with `crypt++'.  Suggested by Chris Moore
     `<Chris.Moore@src.bae.co.uk>'.

   * The `Spell' command should apply to all files in a document.  Maybe
     it could try to restrict to files that have been modified since
     last spell check?  Suggested by Ravinder Bhumbla
     `<rbhumbla@ucsd.edu>'.

   * Make <.> check for abbreviations and sentences ending with capital
     letters.

   * Use Emacs 19 minibuffer history to choose between previewers, and
     other stuff.  Suggested by John Interrante
     `<interran@uluru.Stanford.EDU>'.

   * Make features.

     A new command `TeX-update' (`C-c C-u') could be used to create an
     up-to-date dvi file by repeatedly running BibTeX, MakeIndex and
     (La)TeX, until an error occurs or we are done.

     An alternative is to have an `Update' command that ensures the
     `dvi' file is up to date.  This could be called before printing and
     previewing.

   * Documentation of variables that can be set in a style hook.

     We need a list of what can safely be done in an ordinary style
     hook.  You can not set a variable that AUCTeX depends on, unless
     AUCTeX knows that it has to run the style hooks first.

     Here is the start of such a list.
    `LaTeX-add-environments'

    `TeX-add-symbols'

    `LaTeX-add-labels'

    `LaTeX-add-bibliographies'

    `LaTeX-largest-level'

   * Completion for counters and sboxes.

   * Outline should be (better) supported in TeX mode.

     At least, support headers, trailers, as well as TeX-outline-extra.

   * `TeX-header-start' and `TeX-trailer-end'.

     We might want these, just for fun (and outlines)

   * Plain TeX and LaTeX specific header and trailer expressions.

     We should have a way to globally specify the default value of the
     header and trailer regexps.

   * Get closer to original `TeX-mode' keybindings.

     A third initialization file (`tex-mode.el') containing an emulator
     of the standard `TeX-mode' would help convince some people to
     change to AUCTeX.

   * Make `TeX-next-error' parse ahead and store the results in a list,
     using markers to remember buffer positions in order to be more
     robust with regard to line numbers and changed files.  This is what
     `next-error' does. (Or did, until Emacs 19).

   * Finish the Texinfo mode.  For one thing, many Texinfo mode
     commands do not accept braces around their arguments.

   * Hook up the letter environment with `bbdb.el'.



File: auctex.info,  Node: Bugs,  Prev: Wishlist,  Up: ToDo

Bugs
====

   * The parsed files and style hooks for `example.dtx', `example.sty',
     `example.drv' and `example.bib' all clash.  Bad.

   * `C-c `' should always stay in the current window, also when it
     finds a new file.

   * Do not overwrite emacs warnings about existing auto-save files when
     loading a new file.

   * Maybe the regexp for matching a TeX symbol during parsing should be
     `"\\\\\\([a-zA-Z]+\\|.\\)"' --
     `<thiemann@informatik.uni-tuebingen.de>' Peter Thiemann.

   * AUCTeX should not parse verbatim environments.

   * Make ``' check for math context in `LaTeX-math-mode'. and simply
     self insert if not in a math context.

   * Make `TeX-insert-dollar' more robust.  Currently it can be fooled
     by `\mbox''es and escaped double dollar for example.

   * Correct indentation for tabular, tabbing, table, math, and array
     environments.

   * Syntax highlighting of LaTeX constructs spanning more than one line
     sometimes stops in the middle of the construct.  Highlighting can
     get lost during typing. (XEmacs only)

   * No syntactic font locking of verbatim macros and environments.
     (XEmacs only)

   * Font locking inside of verbatim macros and environments is not
     inhibited.  This may result in syntax highlighting of unbalanced
     dollar signs and the like spilling out of the verbatim content.
     (XEmacs only)

   * Folding of LaTeX constructs spanning more than one line may result
     in overfull lines. (XEmacs only)


File: auctex.info,  Node: FAQ,  Next: Key Index,  Prev: ToDo,  Up: Top

Frequently Asked Questions
**************************

  1. What versions of Emacs and XEmacs are supported?

     AUCTeX was tested with Emacs 21 and XEmacs 21.4.15.  Older
     versions may work but are unsupported.  Older versions of XEmacs
     might possibly made to work by updating the `xemacs-base' package
     through the XEmacs package system.

  2. Why doesn't the completion or multifile stuff work?

     It must be enabled first, insert this in your emacs:

          (setq-default TeX-master nil)
          (setq TeX-parse-self t)
          (setq TeX-auto-save t)

     Read also the chapters about parsing and multifile documents in the
     manual.

  3. Why doesn't `TeX-save-document' work?

     `TeX-check-path' has to contain "./" somewhere.

  4. Why is the information in `foo.tex' forgotten when I save
     `foo.bib'?

     For various reasons, AUCTeX ignores the extension when it stores
     information about a file, so you should use unique base names for
     your files.  E.g. rename `foo.bib' to `foob.bib'.

  5. Why doesn't AUCTeX signal when processing a document is done?

     If the message in the minibuffer stays "Type `C-c C-l' to display
     results of compilation.", you probably have a misconfiguration in
     your init file (`.emacs', `init.el' or similar).  To track this
     down either search in the `*Messages*' buffer for an error message
     or put `(setq debug-on-error t)' as the first line into your init
     file, restart Emacs and open a LaTeX file.  Emacs will complain
     loudly by opening a debugging buffer as soon as an error occurs.
     The information in the debugging buffer can help you find the
     cause of the error in your init file.


File: auctex.info,  Node: Key Index,  Next: Function Index,  Prev: FAQ,  Up: Top

Key Index
*********

* Menu:

* ":                                     Quotes.
* $:                                     Quotes.
* <LFD>:                                 Indenting.
* <TAB>:                                 Indenting.
* C-c %:                                 Commenting.
* C-c ;:                                 Commenting.
* C-c <LFD>:                             Itemize-like.
* C-c ]:                                 Environments.
* C-c ^:                                 Control.
* C-c _:                                 Multifile.
* C-c `:                                 Debugging.
* C-c C-b:                               Commands.
* C-c C-c:                               Commands.
* C-c C-d:                               Multifile.
* C-c C-e:                               Environments.
* C-c C-f:                               Font Specifiers.
* C-c C-f C-b <1>:                       Font Specifiers.
* C-c C-f C-b:                           Editing.
* C-c C-f C-c <1>:                       Editing.
* C-c C-f C-c:                           Font Specifiers.
* C-c C-f C-e <1>:                       Font Specifiers.
* C-c C-f C-e:                           Editing.
* C-c C-f C-f <1>:                       Editing.
* C-c C-f C-f:                           Font Specifiers.
* C-c C-f C-i <1>:                       Font Specifiers.
* C-c C-f C-i:                           Editing.
* C-c C-f C-r <1>:                       Editing.
* C-c C-f C-r:                           Font Specifiers.
* C-c C-f C-s <1>:                       Font Specifiers.
* C-c C-f C-s:                           Editing.
* C-c C-f C-t <1>:                       Editing.
* C-c C-f C-t:                           Font Specifiers.
* C-c C-k:                               Control.
* C-c C-l:                               Control.
* C-c C-m:                               Completion.
* C-c C-n:                               Parsing Files.
* C-c C-o b:                             Folding.
* C-c C-o C-b:                           Folding.
* C-c C-o C-e:                           Folding.
* C-c C-o C-f:                           Folding.
* C-c C-o C-m:                           Folding.
* C-c C-o C-o:                           Folding.
* C-c C-o C-p:                           Folding.
* C-c C-o C-r:                           Folding.
* C-c C-o i:                             Folding.
* C-c C-o p:                             Folding.
* C-c C-o r:                             Folding.
* C-c C-q C-e:                           Filling.
* C-c C-q C-p:                           Filling.
* C-c C-q C-r:                           Filling.
* C-c C-q C-s:                           Filling.
* C-c C-r:                               Commands.
* C-c C-s:                               Sectioning.
* C-c C-t C-i:                           Commands.
* C-c C-t C-o:                           Commands.
* C-c C-t C-p:                           Commands.
* C-c C-t C-r:                           Commands.
* C-c C-t C-s:                           Commands.
* C-c C-v:                               Viewing.
* C-c C-w:                               Debugging.
* C-c {:                                 Quotes.
* C-c ~:                                 Mathematics.
* C-j:                                   Indenting.
* M-<TAB>:                               Completion.
* M-g:                                   Filling.
* M-q:                                   Filling.


File: auctex.info,  Node: Function Index,  Next: Variable Index,  Prev: Key Index,  Up: Top

Function Index
**************

* Menu:

* LaTeX-add-bibliographies:              Adding Other.
* LaTeX-add-environments:                Adding Environments.
* LaTeX-add-labels:                      Adding Other.
* LaTeX-close-environment:               Environments.
* LaTeX-env-item:                        Adding Environments.
* LaTeX-environment:                     Environments.
* LaTeX-fill-environment:                Filling.
* LaTeX-fill-paragraph:                  Filling.
* LaTeX-fill-region:                     Filling.
* LaTeX-fill-section:                    Filling.
* LaTeX-indent-line:                     Indenting.
* LaTeX-insert-environment:              Adding Environments.
* LaTeX-insert-item:                     Itemize-like.
* LaTeX-math-mode:                       Mathematics.
* LaTeX-section:                         Sectioning.
* LaTeX-section-heading:                 Sectioning.
* LaTeX-section-label:                   Sectioning.
* LaTeX-section-section:                 Sectioning.
* LaTeX-section-title:                   Sectioning.
* LaTeX-section-toc:                     Sectioning.
* TeX-add-style-hook:                    Simple Style.
* TeX-add-symbols:                       Adding Macros.
* TeX-arg-cite:                          Adding Macros.
* TeX-arg-conditional:                   Adding Macros.
* TeX-arg-coordinate:                    Adding Macros.
* TeX-arg-corner:                        Adding Macros.
* TeX-arg-counter:                       Adding Macros.
* TeX-arg-define-cite:                   Adding Macros.
* TeX-arg-define-counter:                Adding Macros.
* TeX-arg-define-environment:            Adding Macros.
* TeX-arg-define-label:                  Adding Macros.
* TeX-arg-define-macro:                  Adding Macros.
* TeX-arg-define-savebox:                Adding Macros.
* TeX-arg-environment:                   Adding Macros.
* TeX-arg-eval:                          Adding Macros.
* TeX-arg-file:                          Adding Macros.
* TeX-arg-free:                          Adding Macros.
* TeX-arg-input-file:                    Adding Macros.
* TeX-arg-label:                         Adding Macros.
* TeX-arg-literal:                       Adding Macros.
* TeX-arg-lr:                            Adding Macros.
* TeX-arg-macro:                         Adding Macros.
* TeX-arg-pagestyle:                     Adding Macros.
* TeX-arg-pair:                          Adding Macros.
* TeX-arg-savebox:                       Adding Macros.
* TeX-arg-size:                          Adding Macros.
* TeX-arg-tb:                            Adding Macros.
* TeX-arg-verb:                          Adding Macros.
* TeX-auto-generate:                     Automatic Private.
* TeX-command-buffer:                    Commands.
* TeX-command-master:                    Commands.
* TeX-command-region:                    Commands.
* TeX-comment-or-uncomment-paragraph:    Commenting.
* TeX-comment-or-uncomment-region:       Commenting.
* TeX-complete-symbol:                   Completion.
* TeX-electric-macro:                    Completion.
* TeX-fold-buffer:                       Folding.
* TeX-fold-clearout-buffer:              Folding.
* TeX-fold-clearout-item:                Folding.
* TeX-fold-clearout-paragraph:           Folding.
* TeX-fold-clearout-region:              Folding.
* TeX-fold-dwim:                         Folding.
* TeX-fold-env:                          Folding.
* TeX-fold-macro:                        Folding.
* TeX-fold-mode:                         Folding.
* TeX-fold-paragraph:                    Folding.
* TeX-fold-region:                       Folding.
* TeX-font:                              Font Specifiers.
* TeX-header-end:                        Multifile.
* TeX-home-buffer:                       Control.
* TeX-insert-braces:                     Quotes.
* TeX-insert-dollar:                     Quotes.
* TeX-insert-macro:                      Completion.
* TeX-insert-quote:                      Quotes.
* TeX-interactive-mode:                  Commands.
* TeX-kill-job:                          Control.
* TeX-master-file-ask:                   Multifile.
* TeX-next-error:                        Debugging.
* TeX-normal-mode:                       Parsing Files.
* TeX-Omega-mode:                        Commands.
* TeX-PDF-mode:                          Commands.
* TeX-pin-region:                        Commands.
* TeX-recenter-output-buffer:            Control.
* TeX-save-document:                     Multifile.
* TeX-source-specials-mode:              Commands.
* TeX-toggle-debug-bad-boxes:            Debugging.
* TeX-view:                              Viewing.


File: auctex.info,  Node: Variable Index,  Next: Concept Index,  Prev: Function Index,  Up: Top

Variable Index
**************

* Menu:

* font-latex-do-multi-line:              Font Locking.
* font-latex-fontify-script:             Font Locking.
* font-latex-match-bold-command-keywords: Font Locking.
* font-latex-match-bold-declaration-keywords: Font Locking.
* font-latex-match-function-keywords:    Font Locking.
* font-latex-match-italic-command-keywords: Font Locking.
* font-latex-match-italic-declaration-keywords: Font Locking.
* font-latex-match-math-command-keywords: Font Locking.
* font-latex-match-reference-keywords:   Font Locking.
* font-latex-match-textual-keywords:     Font Locking.
* font-latex-match-title-1-keywords:     Font Locking.
* font-latex-match-title-2-keywords:     Font Locking.
* font-latex-match-title-3-keywords:     Font Locking.
* font-latex-match-title-4-keywords:     Font Locking.
* font-latex-match-type-command-keywords: Font Locking.
* font-latex-match-type-declaration-keywords: Font Locking.
* font-latex-match-variable-keywords:    Font Locking.
* font-latex-match-warning-keywords:     Font Locking.
* font-latex-quotes:                     Font Locking.
* font-latex-script-display:             Font Locking.
* font-latex-title-fontify:              Font Locking.
* font-latex-user-keyword-classes:       Font Locking.
* font-latex-verb-like-commands:         Font Locking.
* font-latex-verbatim-environments:      Font Locking.
* font-latex-verbatim-macros:            Font Locking.
* japanese-LaTeX-command-default:        Japanese.
* japanese-LaTeX-default-style:          Japanese.
* japanese-TeX-command-default:          Japanese.
* LaTeX-amsmath-label:                   Equations.
* LaTeX-auto-label-regexp-list:          Parsing Files.
* LaTeX-auto-minimal-regexp-list:        Parsing Files.
* LaTeX-auto-regexp-list:                Parsing Files.
* LaTeX-csquotes-close-quote:            Quotes.
* LaTeX-csquotes-open-quote:             Quotes.
* LaTeX-csquotes-quote-after-quote:      Quotes.
* LaTeX-default-environment:             Environments.
* LaTeX-default-format:                  Tabular-like.
* LaTeX-default-position:                Tabular-like.
* LaTeX-eqnarray-label:                  Equations.
* LaTeX-equation-label:                  Equations.
* LaTeX-figure-label:                    Floats.
* LaTeX-fill-break-at-separators:        Filling.
* LaTeX-fill-break-before-code-comments: Filling.
* LaTeX-float:                           Floats.
* LaTeX-german-close-quote:              Quotes.
* LaTeX-german-open-quote:               Quotes.
* LaTeX-german-quote-after-quote:        Quotes.
* LaTeX-indent-environment-check:        Indenting.
* LaTeX-indent-environment-list:         Indenting.
* LaTeX-indent-level:                    Indenting.
* LaTeX-item-indent:                     Indenting.
* LaTeX-math-abbrev-prefix:              Mathematics.
* LaTeX-math-list:                       Mathematics.
* LaTeX-math-menu-unicode:               Mathematics.
* LaTeX-paragraph-commands:              Filling.
* LaTeX-section-hook:                    Sectioning.
* LaTeX-section-label:                   Sectioning.
* LaTeX-syntactic-comments:              Indenting.
* LaTeX-table-label:                     Floats.
* plain-TeX-auto-regexp-list:            Parsing Files.
* TeX-auto-cleanup-hook:                 Hacking the Parser.
* TeX-auto-empty-regexp-list:            Parsing Files.
* TeX-auto-full-regexp-list:             Parsing Files.
* TeX-auto-global:                       Automatic Global.
* TeX-auto-local:                        Automatic Local.
* TeX-auto-parse-length:                 Parsing Files.
* TeX-auto-prepare-hook:                 Hacking the Parser.
* TeX-auto-private:                      Automatic Private.
* TeX-auto-regexp-list <1>:              Parsing Files.
* TeX-auto-regexp-list:                  Hacking the Parser.
* TeX-auto-save:                         Parsing Files.
* TeX-auto-untabify:                     Parsing Files.
* TeX-brace-indent-level:                Indenting.
* TeX-check-path:                        Commands.
* TeX-close-quote:                       Quotes.
* TeX-command-default:                   Commands.
* TeX-command-list:                      Commands.
* TeX-default-macro:                     Completion.
* TeX-default-mode:                      Japanese.
* TeX-display-help:                      Debugging.
* TeX-DVI-via-PDFTeX:                    Commands.
* TeX-electric-escape:                   Completion.
* TeX-file-recurse:                      Automatic.
* TeX-fold-env-spec-list:                Folding.
* TeX-fold-macro-spec-list:              Folding.
* TeX-fold-unspec-env-display-string:    Folding.
* TeX-fold-unspec-macro-display-string:  Folding.
* TeX-fold-unspec-use-name:              Folding.
* TeX-font-list:                         Font Specifiers.
* TeX-header-end:                        Commands.
* TeX-ignore-file:                       Automatic.
* TeX-insert-braces:                     Completion.
* TeX-insert-macro-default-style:        Completion.
* TeX-install-font-lock:                 Font Locking.
* TeX-interactive-mode:                  Commands.
* TeX-language-cz-hook:                  European.
* TeX-language-de-hook:                  European.
* TeX-language-dk-hook:                  European.
* TeX-language-it-hook:                  European.
* TeX-language-nl-hook:                  European.
* TeX-language-pl-hook:                  European.
* TeX-language-sk-hook:                  European.
* TeX-language-sv-hook:                  European.
* TeX-lisp-directory:                    Customizing.
* TeX-macro-global <1>:                  Automatic Global.
* TeX-macro-global:                      Customizing.
* TeX-macro-private:                     Automatic Private.
* TeX-master <1>:                        Multifile.
* TeX-master:                            Commands.
* TeX-newline-function:                  Indenting.
* TeX-Omega-mode:                        Commands.
* TeX-one-master:                        Multifile.
* TeX-open-quote:                        Quotes.
* TeX-outline-extra:                     Outline.
* TeX-output-view-style:                 Viewing.
* TeX-parse-self:                        Parsing Files.
* TeX-PDF-mode:                          Commands.
* TeX-quote-after-quote:                 Quotes.
* TeX-region:                            Commands.
* TeX-save-query:                        Multifile.
* TeX-source-specials-mode:              Commands.
* TeX-source-specials-view-start-server: Viewing.
* TeX-style-global:                      Automatic Global.
* TeX-style-local:                       Automatic Local.
* TeX-style-path:                        Automatic.
* TeX-style-private:                     Automatic Private.
* TeX-trailer-start:                     Commands.
* TeX-view-style:                        Viewing.


File: auctex.info,  Node: Concept Index,  Prev: Variable Index,  Up: Top

Concept Index
*************

* Menu:

* .emacs:                                Loading the package.
* \begin:                                Environments.
* \chapter <1>:                          Editing.
* \chapter:                              Sectioning.
* \cite, completion of:                  Completion.
* \emph <1>:                             Editing.
* \emph:                                 Font Specifiers.
* \end:                                  Environments.
* \include:                              Multifile.
* \input:                                Multifile.
* \item:                                 Itemize-like.
* \label <1>:                            Sectioning.
* \label:                                Editing.
* \label, completion:                    Completion.
* \ref, completion:                      Completion.
* \section <1>:                          Sectioning.
* \section:                              Editing.
* \subsection <1>:                       Editing.
* \subsection:                           Sectioning.
* \textbf <1>:                           Font Specifiers.
* \textbf:                               Editing.
* \textit <1>:                           Editing.
* \textit:                               Font Specifiers.
* \textrm <1>:                           Font Specifiers.
* \textrm:                               Editing.
* \textsc <1>:                           Font Specifiers.
* \textsc:                               Editing.
* \textsf <1>:                           Font Specifiers.
* \textsf:                               Editing.
* \textsl <1>:                           Editing.
* \textsl:                               Font Specifiers.
* \texttt <1>:                           Font Specifiers.
* \texttt:                               Editing.
* Abbreviations:                         Mathematics.
* Adding a style hook:                   Simple Style.
* Adding bibliographies:                 Adding Other.
* Adding environments:                   Adding Environments.
* Adding labels:                         Adding Other.
* Adding macros:                         Adding Macros.
* Adding other information:              Adding Other.
* Advanced features:                     Advanced Features.
* amsmath:                               Equations.
* ANSI:                                  European.
* Arguments to TeX macros:               Completion.
* auto directories.:                     Automatic.
* Auto-Reveal:                           Folding.
* Automatic:                             Automatic.
* Automatic Customization:               Automatic.
* Automatic Parsing:                     Parsing Files.
* Automatic updating style hooks:        Automatic Local.
* Bad boxes:                             Debugging.
* Bibliographies, adding:                Adding Other.
* Bibliography:                          Commands.
* bibliography, completion:              Completion.
* BibTeX:                                Commands.
* BibTeX, completion:                    Completion.
* book.el:                               Simple Style.
* Braces:                                Quotes.
* Brackets:                              Quotes.
* Changing font:                         Font Specifiers.
* Changing the parser:                   Hacking the Parser.
* Chapters <1>:                          Sectioning.
* Chapters:                              Editing.
* Character set:                         I18n.
* Checking:                              Checking.
* chktex:                                Checking.
* citations, completion of:              Completion.
* cite, completion of:                   Completion.
* Commands:                              Commands.
* Completion:                            Completion.
* Controlling the output:                Control.
* Copying:                               Copying.
* Copyright:                             Copying.
* Current file:                          Control.
* Customization:                         Customizing.
* Customization, personal:               Customizing.
* Customization, site:                   Customizing.
* Czech:                                 European.
* Danish:                                European.
* Debugging:                             Debugging.
* Default command:                       Commands.
* Defining bibliographies in style hooks: Adding Other.
* Defining environments in style hooks:  Adding Environments.
* Defining labels in style hooks:        Adding Other.
* Defining macros in style hooks:        Adding Macros.
* Defining other information in style hooks: Adding Other.
* Deleting fonts <1>:                    Editing.
* Deleting fonts:                        Font Specifiers.
* Denmark:                               European.
* Descriptions:                          Itemize-like.
* Display math mode:                     Quotes.
* Distribution:                          Copying.
* Documents:                             Multifile.
* Documents with multiple files:         Multifile.
* Dollars:                               Quotes.
* Double quotes:                         Quotes.
* Dutch:                                 European.
* Enumerates:                            Itemize-like.
* Environments:                          Environments.
* Environments, adding:                  Adding Environments.
* Eqnarray:                              Equations.
* Equation:                              Equations.
* Equations:                             Equations.
* Errors:                                Debugging.
* Europe:                                European.
* European Characters:                   European.
* Example of a style file.:              Simple Style.
* Expansion:                             Completion.
* External Commands:                     Commands.
* Extracting TeX symbols:                Automatic.
* Faces:                                 Font Locking.
* Figure environment:                    Floats.
* Figures:                               Floats.
* File Variables:                        Commands.
* Filling:                               Filling.
* Finding errors:                        Checking.
* Finding the current file:              Control.
* Finding the master file:               Control.
* Floats:                                Floats.
* Folding <1>:                           Folding.
* Folding:                               Outline.
* Font Locking:                          Font Locking.
* Font macros:                           Font Specifiers.
* font-latex:                            Font Locking.
* Fonts:                                 Font Specifiers.
* Formatting <1>:                        Filling.
* Formatting <2>:                        Commands.
* Formatting:                            Indenting.
* Forward search:                        Viewing.
* Free:                                  Copying.
* Free software:                         Copying.
* General Public License:                Copying.
* Generating symbols:                    Automatic.
* Germany:                               European.
* Global directories:                    Automatic Global.
* Global macro directory:                Automatic Global.
* Global style hook directory:           Automatic Global.
* Global TeX macro directory:            Automatic Global.
* GPL:                                   Copying.
* Header:                                Commands.
* Headers:                               Outline.
* Hide Macros:                           Folding.
* Holland:                               European.
* Including:                             Multifile.
* Indentation:                           Indenting.
* Indenting:                             Indenting.
* Indexing:                              Commands.
* Initialization:                        Customizing.
* Inputing:                              Multifile.
* Installation:                          Build/install.
* Internationalization:                  I18n.
* Inverse search:                        Viewing.
* ISO 8859 Latin 1:                      European.
* ISO 8859 Latin 2:                      European.
* iso-cvt.el:                            European.
* ispell:                                European.
* Italy:                                 European.
* Itemize:                               Itemize-like.
* Items:                                 Itemize-like.
* Japan:                                 Japanese.
* Japanese:                              Japanese.
* jLaTeX:                                Japanese.
* jTeX:                                  Japanese.
* Killing a process:                     Control.
* Label prefix <1>:                      Sectioning.
* Label prefix:                          Floats.
* Labels <1>:                            Floats.
* Labels:                                Sectioning.
* Labels, adding:                        Adding Other.
* labels, completion of:                 Completion.
* lacheck:                               Checking.
* LaTeX:                                 Commands.
* Latin 1:                               European.
* Latin 2:                               European.
* License:                               Copying.
* Literature:                            Commands.
* Local style directory:                 Automatic Local.
* Local style hooks:                     Automatic Local.
* Local Variables:                       Commands.
* Macro arguments:                       Completion.
* Macro completion:                      Completion.
* Macro expansion:                       Completion.
* macro.el:                              Hacking the Parser.
* macro.tex:                             Hacking the Parser.
* Macros, adding:                        Adding Macros.
* Make:                                  Build/install.
* makeindex:                             Commands.
* Making a bibliography:                 Commands.
* Making an index:                       Commands.
* Many Files:                            Multifile.
* Master file <1>:                       Multifile.
* Master file:                           Control.
* Matching dollar signs:                 Quotes.
* Math mode delimiters:                  Quotes.
* Mathematics:                           Mathematics.
* MULE:                                  Japanese.
* Multifile Documents:                   Multifile.
* Multiple Files:                        Multifile.
* National letters:                      I18n.
* Next error:                            Debugging.
* Nippon:                                Japanese.
* Omega:                                 Commands.
* Other information, adding:             Adding Other.
* Outlining <1>:                         Folding.
* Outlining:                             Outline.
* Output:                                Control.
* Overfull boxes:                        Debugging.
* Overview:                              Outline.
* Parsing errors:                        Debugging.
* Parsing LaTeX errors:                  Debugging.
* Parsing new macros:                    Hacking the Parser.
* Parsing TeX <1>:                       Automatic.
* Parsing TeX:                           Parsing Files.
* Parsing TeX output:                    Debugging.
* Personal customization:                Customizing.
* Personal information:                  Automatic Private.
* Personal macro directory:              Automatic Private.
* Personal TeX macro directory:          Automatic Private.
* pLaTeX:                                Japanese.
* Poland:                                European.
* Prefix for labels <1>:                 Floats.
* Prefix for labels:                     Sectioning.
* Previewing:                            Viewing.
* Printing:                              Commands.
* Private directories:                   Automatic Private.
* Private macro directory:               Automatic Private.
* Private style hook directory:          Automatic Private.
* Private TeX macro directory:           Automatic Private.
* Problems:                              Checking.
* Processes:                             Control.
* pTeX:                                  Japanese.
* Quotes:                                Quotes.
* Quotes, fontification of:              Font Locking.
* Redisplay output:                      Control.
* Refilling:                             Filling.
* Reformatting <1>:                      Filling.
* Reformatting:                          Indenting.
* Region:                                Commands.
* Region file:                           Commands.
* Reindenting:                           Indenting.
* Reveal:                                Folding.
* Right:                                 Copying.
* Running BibTeX:                        Commands.
* Running chktex:                        Checking.
* Running commands:                      Commands.
* Running lacheck:                       Checking.
* Running LaTeX:                         Commands.
* Running makeindex:                     Commands.
* Running TeX:                           Commands.
* Sample style file:                     Simple Style.
* Sectioning <1>:                        Sectioning.
* Sectioning:                            Editing.
* Sectioning commands, fontification of: Font Locking.
* Sections <1>:                          Editing.
* Sections <2>:                          Outline.
* Sections:                              Sectioning.
* Setting the default command:           Commands.
* Setting the header:                    Commands.
* Setting the trailer:                   Commands.
* Site customization:                    Customizing.
* Site information:                      Automatic Global.
* Site initialization:                   Customizing.
* Site macro directory:                  Automatic Global.
* Site TeX macro directory:              Automatic Global.
* Slovakia:                              European.
* Source specials:                       Viewing.
* Specifying a font:                     Font Specifiers.
* Starting a previewer:                  Viewing.
* Stopping a process:                    Control.
* style:                                 Style Files.
* Style:                                 Checking.
* Style file:                            Simple Style.
* Style files:                           Style Files.
* Style hook:                            Simple Style.
* Style hooks:                           Style Files.
* Subscript, fontification of:           Font Locking.
* Superscript, fontification of:         Font Locking.
* Sweden:                                European.
* Symbols:                               Mathematics.
* Syntax Highlighting:                   Font Locking.
* Tabify:                                Parsing Files.
* Table environment:                     Floats.
* Tables:                                Floats.
* Tabs:                                  Parsing Files.
* TeX:                                   Commands.
* TeX parsing:                           Automatic.
* tex-site.el:                           Customizing.
* Trailer:                               Commands.
* Untabify:                              Parsing Files.
* Updating style hooks:                  Automatic Local.
* Variables:                             Commands.
* Verbatim, fontification of:            Font Locking.
* Viewing:                               Viewing.
* Warranty:                              Copying.
* Wonderful boxes:                       Debugging.
* Writing to a printer:                  Commands.
* x-compose.el:                          European.
* X-Symbol:                              European.



Tag Table:
Node: Top224
Node: Copying2960
Node: Introduction4907
Node: Installation8269
Node: Prerequisites9085
Node: Configure10355
Node: Build/install12840
Node: Loading the package13293
Node: Advice for package providers14744
Node: Advice for non-privileged users16039
Node: Installation under MS Windows20061
Node: Customizing25931
Node: Quick Start28519
Ref: Quick Start-Footnote-130321
Node: Editing30468
Node: Processing35134
Node: Frequently Used Commands38930
Node: Quotes39699
Node: Font Specifiers42853
Node: Sectioning44536
Node: Environments48856
Node: Equations51182
Node: Floats51758
Node: Itemize-like53003
Node: Tabular-like53506
Node: Customizing environments54095
Node: Advanced Features54323
Node: Mathematics55086
Node: Completion56776
Node: Commenting60767
Node: Indenting62095
Node: Filling67833
Node: Display73357
Node: Font Locking74713
Node: Folding87260
Node: Outline93563
Node: Running TeX and friends94808
Node: Commands95558
Node: Viewing103187
Node: Debugging106966
Node: Checking108173
Node: Control109495
Node: Multifile110209
Node: Parsing Files114903
Node: I18n119233
Node: European119756
Node: Japanese122858
Node: Automatic124655
Node: Automatic Global127142
Node: Automatic Private128288
Node: Automatic Local129526
Node: Style Files130600
Node: Simple Style131391
Node: Adding Macros132508
Node: Adding Environments138073
Node: Adding Other140646
Node: Hacking the Parser141219
Node: Changes145158
Node: ToDo157951
Node: Mid-term Goals158575
Node: Wishlist160064
Node: Bugs166253
Node: FAQ167817
Node: Key Index169606
Node: Function Index173152
Node: Variable Index177944
Node: Concept Index184916

End Tag Table
