1. xemacs
  2. auctex


matsl  committed 29bd917

Add files from distribution

  • Participants
  • Parent commits e23df0e
  • Branches auctex-11_84-import

Comments (0)

Files changed (142)

File doc/Makefile.in

View file
+MAKEINFO_PLAIN=-D rawfile --no-headers
+MKINSTALLDIRS = ../mkinstalldirs
+AUCTEXTEXIFILES = auctex.texi install.texi wininstall.texi intro.texi \
+	changes.texi todo.texi faq.texi macros.texi quickstart.texi \
+	fdl.texi version.texi
+PREVIEWTEXIFILES = copying.texi preview-faq.texi macros.texi \
+	preview-dtxdoc.texi preview-latex.texi preview-problems.texi \
+	preview-readme.texi preview-todo.texi version.texi
+all: dist
+info: auctex.info preview-latex.info
+dvi: auctex.dvi tex-ref.dvi preview-latex.dvi
+install: install-auctex install-preview
+	test x$(packagedir) != xno && \
+	{ $(MKINSTALLDIRS) $(DESTDIR)$(packagedir)/man/auctex ; \
+	for i in $(AUCTEXTEXIFILES) $(PREVIEWTEXIFILES) tex-ref.tex ; \
+	do echo $(INSTALL_DATA) $$i $(DESTDIR)$(packagedir)/man/auctex; \
+	   $(INSTALL_DATA) $$i $(DESTDIR)$(packagedir)/man/auctex; \
+	done ; \
+	}
+dist: $(DISTTEXTS) preview-latex.info auctex.info
+extradist: html/auctex_toc.html auctex.ps auctex.pdf tex-ref.ps tex-ref.pdf
+.PHONY: all info dvi dist install-auctex disttexts clean distclean \
+	maintainer-clean install-preview install-man html-docs extradist
+html/auctex_toc.html: auctex.texi
+	rm -rf html
+	mkdir html
+	cd html && $(TEXI2HTML) -split_node -I .. ../auctex.texi && \
+	test ! -d auctex || { mv auctex/* . && rm -rf auctex ; }
+tex-ref.dvi: tex-ref.tex
+	$(TEX) tex-ref
+tex-ref.ps: tex-ref.dvi
+	$(DVIPS) tex-ref.dvi -Ppdf -o tex-ref.ps
+tex-ref.pdf: tex-ref.tex
+	$(PDFTEX) tex-ref.tex
+version.texi: ../ChangeLog
+	echo @set VERSION $(AUCTEXVERSION) >version.texi
+	echo @set UPDATED $(AUCTEXDATE) >>version.texi
+auctex.dvi: $(AUCTEXTEXIFILES)
+	$(TEXI2DVI) auctex.texi
+auctex.pdf: $(AUCTEXTEXIFILES)
+	$(TEXI2PDF) auctex.texi
+auctex.ps: auctex.dvi
+	$(DVIPS) auctex.dvi -Ppdf -o auctex.ps
+auctex.info: $(AUCTEXTEXIFILES)
+	$(MAKEINFO) auctex.texi
+install-auctex: auctex.info
+	-$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
+	rm -f $(DESTDIR)$(infodir)/auctex $(DESTDIR)$(infodir)/auctex-*
+	$(INSTALL_DATA) auctex.info $(DESTDIR)$(infodir)
+	for x in auctex.info-*; do \
+	  if [ -r $$x ]; then \
+	    $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
+	  fi; \
+	done
+	-$(INSTALL_INFO)  --info-dir=$(DESTDIR)$(infodir) auctex.info
+# preview
+preview-latex/index.html: $(PREVIEWTEXIFILES)
+	rm -f preview-latex/*
+	$(TEXI2HTML) preview-latex.texi
+html-docs: preview-latex/index.html
+preview-dtxdoc.texi: ../preview/latex/preview.dtx preview-dtxdoc.pl
+	-$(PERL) preview-dtxdoc.pl ../preview/latex/preview.dtx \
+		preview-dtxdoc.texi
+preview-latex.dvi: $(PREVIEWTEXIFILES)
+	$(TEXI2DVI) preview-latex.texi
+preview-latex.ps: preview-latex.dvi
+	$(DVIPS) preview-latex.dvi -Ppdf -o preview-latex.ps
+preview-latex.pdf: $(PREVIEWTEXIFILES)
+	$(TEXI2PDF) preview-latex.texi
+preview-latex.info: $(PREVIEWTEXIFILES)
+	$(MAKEINFO) preview-latex.texi
+install-preview: preview-latex.info
+	-$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
+	for x in preview-latex.info* ; do \
+		$(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
+	done
+	-$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) preview-latex.info
+# disttexts
+../INSTALL: install.texi macros.texi
+	$(MAKEINFO) $(MAKEINFO_PLAIN) install.texi --output $@
+../INSTALL.windows: wininstall.texi macros.texi
+	$(MAKEINFO) $(MAKEINFO_PLAIN) wininstall.texi --output $@
+../README: intro.texi preview-readme.texi macros.texi
+	$(MAKEINFO) $(MAKEINFO_PLAIN) intro.texi --output $@
+	$(MAKEINFO) $(MAKEINFO_PLAIN) preview-readme.texi --output - >> $@
+../CHANGES: changes.texi macros.texi
+	$(MAKEINFO) $(MAKEINFO_PLAIN) changes.texi --output $@
+../TODO: todo.texi preview-todo.texi macros.texi
+	$(MAKEINFO) $(MAKEINFO_PLAIN) todo.texi --output $@
+	$(MAKEINFO) $(MAKEINFO_PLAIN) preview-todo.texi --output - >> $@
+../FAQ: faq.texi preview-faq.texi macros.texi
+	$(MAKEINFO) $(MAKEINFO_PLAIN) faq.texi --output $@
+	$(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections preview-faq.texi --output - >> $@
+../PROBLEMS: preview-problems.texi macros.texi
+	$(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections preview-problems.texi --output $@
+# clean
+	rm -f *.dvi *.ps *.pdf *.aux *.cp *.fn *.ky *.log *~ \#*\# \
+		*.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \
+		*.fns *.vrs *.pgs *.tmp *.html
+	rm -rf html preview-latex
+distclean: clean
+	rm -f Makefile
+maintainer-clean: distclean
+		preview-dtxdoc.texi version.texi $(DISTTEXTS) *.info *.info-*

File doc/auctex.texi

View file
+\input texinfo
+@comment %**start of header
+@setfilename auctex.info
+@include version.texi
+@settitle AUCTeX @value{VERSION}
+@c footnotestyle separate
+@c paragraphindent 2
+@comment %**end of header
+@include macros.texi
+This manual is for @AUCTeX{}
+(version @value{VERSION} from @value{UPDATED}),
+a sophisticated TeX environment for Emacs.
+Copyright @copyright{} 1992, 1993, 1994, 1995, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.  A
+copy of the license is included in the section entitled ``GNU Free
+Documentation License.''
+@end quotation
+@end copying
+@dircategory Emacs
+@dircategory TeX
+* AUCTeX: (auctex).     A sophisticated TeX environment for Emacs.
+@end direntry
+@tolerance 10000 @emergencystretch 3em
+@end iftex
+@title @AUCTeX{}
+@subtitle A sophisticated @TeX{} environment for Emacs
+@subtitle Version @value{VERSION}, @value{UPDATED}
+@author Kresten Krab Thorup
+@author Per Abrahamsen
+@author David Kastrup and others
+@vskip 0pt plus 1filll
+@end titlepage
+@c Use @ifinfo _and_ @ifhtml here because Texinfo 3 cannot cope with
+@c @ifnottex around a top node.
+@node top
+@top @AUCTeX{}
+This manual may be copied under the conditions spelled out in
+@ref{Copying this Manual}.
+@end ifinfo
+@node top
+@top @AUCTeX{}
+@end ifhtml
+@unnumbered Executive Summary
+@end iftex
+@AUCTeX{} is an integrated environment for editing @LaTeX{}, @ConTeXt{},
+doc@TeX{}, Texinfo, and @TeX{} files.
+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.
+It is a good idea to make a printout of @AUCTeX{}'s reference card
+@file{tex-ref.tex} or one of its typeset versions.
+If you want to make @AUCTeX{} aware of style files and multi-file
+documents right away, insert the following in your @file{.emacs} file.
+(setq TeX-auto-save t)
+(setq TeX-parse-self t)
+(setq-default TeX-master nil)
+@end lisp
+Another thing you should enable is Ref@TeX{}, a comprehensive solution
+for managing cross references, bibliographies, indices, document
+navigation and a few other things.  (@pxref{Installation,,,reftex,The
+Ref@TeX{} manual})
+For detailed information about the @previewlatex{} subsystem of
+@AUCTeX{}, see @ref{Top,,Introduction,preview-latex,The @previewlatex{}
+There is a mailing list for general discussion about @AUCTeX{}: write a
+mail with ``subscribe'' in the subject to
+@email{auctex-request@@gnu.org} to join it.  Send contributions to
+Bug reports should go to @email{bug-auctex@@gnu.org}, suggestions for
+new features, and pleas for help should go to either
+@email{auctex-devel@@gnu.org} (the @AUCTeX{} developers), or to
+@email{auctex@@gnu.org} if they might have general interest.  Please use
+the command @kbd{M-x TeX-submit-bug-report RET} to report bugs if
+possible.  You can subscribe to a low-volume announcement list by
+sending ``subscribe'' in the subject of a mail to
+* 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 Screen Display
+* Running TeX and friends::     Starting Processors, Viewers and Other Programs
+* Multifile::                   Multifile Documents
+* Parsing Files::               Automatic Parsing of @TeX{} Files
+* Internationalization::        Language Support
+* Automatic::                   Automatic Customization
+* Style Files::                 Writing Your own Style Support
+* Copying this Manual::         GNU Free Documentation License
+* Changes::                     Changes and New Features
+* Development::                 Future Development
+* FAQ::                         Frequently Asked Questions
+* Key Index::                   Key Index
+* Function Index::              Function Index
+* Variable Index::              Variable Index
+* Concept Index::               Concept Index
+ --- The Detailed Node Listing ---
+Inserting Frequently Used Commands
+* Quotes::                      Inserting double quotes
+* Font Specifiers::             Inserting Font Specifiers
+* Sectioning::                  Inserting chapters, sections, etc.
+* Environments::                Inserting Environment Templates
+Inserting Environment Templates
+* Equations::                   Equations
+* Floats::                      Floats
+* Itemize-like::                Itemize-like
+* Tabular-like::                Tabular-like
+* Customizing environments::    Customizing environments
+Advanced Editing Features
+* Mathematics::                 Entering Mathematics
+* Completion::                  Completion of macros
+* Commenting::                  Commenting text
+* Indenting::                   Reflecting syntactic constructs with whitespace
+* Filling::                     Automatic and manual line breaking
+Controlling Screen Display
+* Font Locking::                Font Locking
+* Folding::                     Folding Macros and Environments
+* Outline::                     Outlining the Document
+Starting Processors, Viewers and Other Programs
+* Commands::                    Invoking external commands.
+* Viewing::                     Invoking external viewers.
+* Debugging::                   Debugging @TeX{} and @LaTeX{} output.
+* Checking::                    Checking the document.
+* Control::                     Controlling the processes.
+* Cleaning::                    Cleaning intermediate and output files.
+* Documentation::               Documentation about macros and packages.
+Language Support
+* European::                    Using @AUCTeX{} with European Languages
+* Japanese::                    Using @AUCTeX{} with Japanese
+Automatic Customization
+* Automatic Global::            Automatic Customization for the Site
+* Automatic Private::           Automatic Customization for a User
+* Automatic Local::             Automatic Customization for a Directory
+Writing Your own Style Support
+* 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
+@end detailmenu
+@end menu
+@node Copying
+@unnumbered Copying
+@cindex Copying
+@cindex Copyright
+@cindex GPL
+@cindex General Public License
+@cindex License
+@cindex Free
+@cindex Free software
+@cindex Distribution
+@cindex Right
+@cindex Warranty
+@c This text adapted from the Texinfo 2.16 distribution.
+@AUCTeX{} primarily consists of Lisp files for Emacs (and XEmacs), but
+there are also installation scripts and files and @TeX{} support files.
+All of those are @dfn{free}; this means that everyone is free to use
+them and free to redistribute them on a free basis.  The files of
+@AUCTeX{} 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 files that constitute @AUCTeX{}, that you receive source
+code or else can get it if you want it, that you can change these files
+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 parts of @AUCTeX{}, 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 @AUCTeX{}.  If any parts 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 files currently being
+distributed as part of @AUCTeX{} are found in the General Public
+Licenses that accompany them.  This manual specifically is covered by
+the GNU Free Documentation License (@pxref{Copying this Manual}).
+@include intro.texi
+@include install.texi
+@include quickstart.texi
+@node Frequently Used Commands
+@chapter 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 @samp{\begin@{@}}-@samp{\end@{@}}
+* Quotes::                      Inserting double quotes
+* Font Specifiers::             Inserting Font Specifiers
+* Sectioning::                  Inserting chapters, sections, etc.
+* Environments::                Inserting Environment Templates
+@end menu
+@node Quotes
+@section Insertion of Quotes, Dollars, and Braces
+@cindex Quotes
+@cindex Double quotes
+@cindex Braces
+@cindex Brackets
+@cindex Dollars
+@cindex Math mode delimiters
+@cindex Matching dollar signs
+@cindex Display math mode
+In @TeX{}, literal double quotes @samp{"like this"} are seldom used,
+instead two single quotes are used @samp{``like this''}.  To help you
+insert these efficiently, @AUCTeX{} allows you to continue to press
+@kbd{"} to insert two single quotes.  To get a literal double quote,
+press @kbd{"} twice.
+@deffn Command TeX-insert-quote @var{count}
+@kindex "
+(@kbd{"}) Insert the appropriate quote marks for @TeX{}.
+Inserts the value of @code{TeX-open-quote} (normally @samp{``}) or
+@code{TeX-close-quote} (normally @samp{''}) depending on the context.
+With prefix argument, always inserts @samp{"} characters.
+@end deffn
+@defopt TeX-open-quote
+String inserted by typing @kbd{"} to open a quotation.
+@end defopt
+@defopt TeX-close-quote
+String inserted by typing @kbd{"} to close a quotation.
+@end defopt
+@defopt TeX-quote-after-quote
+Determines the behavior of @kbd{"}.  If it is non-nil, typing @kbd{"}
+will insert a literal double quote.  The respective values of
+@code{TeX-open-quote} and @code{TeX-close-quote} will be inserted
+after typing @kbd{"} once again.
+@end defopt
+The @samp{babel} package provides special support for the requirements
+of typesetting quotation marks in many different languages.  If you use
+this package, either directly or by loading a language-specific style
+file, you should also use the special commands for quote insertion
+instead of the standard quotes shown above.  @AUCTeX{} is able to
+recognize several of these languages and will change quote insertion
+accordingly.  @xref{European}, for details about this feature and how to
+control it.
+@vindex LaTeX-csquotes-open-quote
+@vindex LaTeX-csquotes-close-quote
+@vindex LaTeX-csquotes-quote-after-quote
+In case you are using the @samp{csquotes} package, you should customize
+@code{LaTeX-csquotes-open-quote}, @code{LaTeX-csquotes-close-quote} and
+@code{LaTeX-csquotes-quote-after-quote}.  The quotation characters will
+only be used if both variables---@code{LaTeX-csquotes-open-quote} and
+@code{LaTeX-csquotes-close-quote}---are non-empty strings.  But then the
+@samp{csquotes}-related values will take precedence over the
+language-specific 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 @samp{$} you insert in a paragraph will
+do nothing special.  The second @samp{$} 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
+@samp{$$} @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.
+@deffn Command TeX-insert-dollar @var{arg}
+@kindex $
+(@kbd{$}) 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 @var{arg}, insert that many dollar signs.
+@end deffn
+To avoid unbalanced braces, it is useful to insert them pairwise.  You
+can do this by typing @kbd{C-c @{}.
+@deffn Command TeX-insert-braces
+@kindex C-c @{
+(@kbd{C-c @{}) Make a pair of braces and position the cursor
+to type inside of them.  If there is an active region, put braces around
+it and leave point after the closing brace.
+@end deffn
+@node Font Specifiers
+@section Inserting Font Specifiers
+@cindex Fonts
+@cindex Font macros
+@cindex Changing font
+@cindex Specifying a font
+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 @kbd{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 @code{@point{}} indicating the position where the text
+will be inserted.
+@table @kbd
+@item C-c C-f C-b
+@kindex C-c C-f C-b
+@cindex @code{\textbf}
+Insert @b{bold face} @samp{\textbf@{@point{}@}} text.
+@item C-c C-f C-i
+@kindex C-c C-f C-i
+@cindex @code{\textit}
+Insert @i{italics} @samp{\textit@{@point{}@}} text.
+@item C-c C-f C-e
+@kindex C-c C-f C-e
+@cindex @code{\emph}
+Insert @i{emphasized} @samp{\emph@{@point{}@}} text.
+@item C-c C-f C-s
+@kindex C-c C-f C-s
+@cindex @code{\textsl}
+Insert @i{slanted} @samp{\textsl@{@point{}@}} text.
+@item C-c C-f C-r
+@kindex C-c C-f C-r
+@cindex @code{\textrm}
+Insert roman @r{\textrm@{@point{}@}} text.
+@item C-c C-f C-f
+@kindex C-c C-f C-f
+@cindex @code{\textsf}
+Insert @sans{sans serif} @samp{\textsf@{@point{}@}} text.
+@item C-c C-f C-t
+@kindex C-c C-f C-t
+@cindex @code{\texttt}
+Insert @t{typewriter} @samp{\texttt@{@point{}@}} text.
+@item C-c C-f C-c
+@kindex C-c C-f C-c
+@cindex @code{\textsc}
+Insert @sc{small caps} @samp{\textsc@{@point{}@}} text.
+@item C-c C-f C-d
+@kindex C-c C-f C-c
+@cindex Deleting fonts
+Delete the innermost font specification containing point.
+@end table
+@deffn Command TeX-font @var{arg}
+@kindex C-c C-f
+(@kbd{C-c C-f}) Insert template for font change command.
+If @var{replace} is not nil, replace current font.  @var{what}
+determines the font to use, as specified by @code{TeX-font-list}.
+@end deffn
+@defopt 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.
+@end defopt
+@node Sectioning
+@section Inserting chapters, sections, etc.
+@cindex Sectioning
+@cindex Sections
+@cindex Chapters
+@cindex @code{\chapter}
+@cindex @code{\section}
+@cindex @code{\subsection}
+@cindex @code{\label}
+Insertion of sectioning macros, that is @samp{\chapter},
+@samp{\section}, @samp{\subsection}, etc. and accompanying
+@samp{\label}'s may be eased by using @kbd{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
+@deffn Command LaTeX-section @var{arg}
+@kindex C-c C-s
+(@kbd{C-c C-s}) Insert a sectioning command.
+Determine the type of section to be inserted, by the argument
+@itemize @bullet
+If @var{arg} is nil or missing, use the current level.
+If @var{arg} is a list (selected by C-u), go downward one level.
+If @var{arg} is negative, go up that many levels.
+If @var{arg} is positive or zero, use absolute level:
+@itemize +
+0 : part
+1 : chapter
+2 : section
+3 : subsection
+4 : subsubsection
+5 : paragraph
+6 : subparagraph
+@end itemize
+@end itemize
+The following variables can be set to customize the function.
+@vtable @code
+@item LaTeX-section-hook
+Hooks to be run when inserting a section.
+@item LaTeX-section-label
+Prefix to all section references.
+@end vtable
+@end deffn
+The precise behavior of @code{LaTeX-section} is defined by the contents
+of @code{LaTeX-section-hook}.
+@defopt LaTeX-section-hook
+List of hooks to run when a new section is inserted.
+The following variables are set before the hooks are run
+@table @var
+@item level
+Numeric section level, default set by prefix arg to @code{LaTeX-section}.
+@item name
+Name of the sectioning command, derived from @var{level}.
+@item title
+The title of the section, default to an empty string.
+@item toc
+Entry for the table of contents list, default nil.
+@item done-mark
+Position of point afterwards, default nil meaning after the inserted
+@end table
+A number of hooks are already defined.  Most likely, you will be able to
+get the desired functionality by choosing from these hooks.
+@ftable @code
+@item LaTeX-section-heading
+Query the user about the name of the sectioning command.  Modifies
+@var{level} and @var{name}.
+@item LaTeX-section-title
+Query the user about the title of the section. Modifies @var{title}.
+@item LaTeX-section-toc
+Query the user for the toc entry.  Modifies @var{toc}.
+@item LaTeX-section-section
+Insert @LaTeX{} section command according to @var{name}, @var{title},
+and @var{toc}.  If @var{toc} is nil, no toc entry is inserted.  If
+@var{toc} or @var{title} are empty strings, @var{done-mark} will be
+placed at the point they should be inserted.
+@item LaTeX-section-label
+Insert a label after the section command.  Controlled by the variable
+@end ftable
+To get a full featured @code{LaTeX-section} command, insert
+(setq LaTeX-section-hook
+      '(LaTeX-section-heading
+	LaTeX-section-title
+	LaTeX-section-toc
+	LaTeX-section-section
+	LaTeX-section-label))
+@end lisp
+in your @file{.emacs} file.
+@end defopt
+The behavior of @code{LaTeX-section-label} is determined by the
+variable @code{LaTeX-section-label}.
+@defopt 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.
+@cindex Prefix for labels
+@cindex Label prefix
+@cindex Labels
+By default, chapters have a prefix of @samp{cha:} while sections and
+subsections have a prefix of @samp{sec:}.  Labels are not automatically
+inserted for other types of sections.
+@end defopt
+@node Environments
+@section Inserting Environment Templates
+@cindex Environments
+@cindex @samp{\begin}
+@cindex @samp{\end}
+A large apparatus is available that supports insertions of environments,
+that is @samp{\begin@{@}} --- @samp{\end@{@}} pairs.
+@AUCTeX{} is aware of most of the actual environments available in a
+specific document.  This is achieved by examining your
+@samp{\documentclass} command, and consulting a precompiled list of
+environments available in a large number of styles.
+You insert an environment with @kbd{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
+@kbd{C-u C-c C-e} you will change the current environment.
+@deffn Command LaTeX-environment @var{arg}
+@kindex C-c C-e
+(@kbd{C-c C-e})  @AUCTeX{} will prompt you for an environment
+to insert.  At this prompt, you may press @key{TAB} or @key{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 @var{arg} is not-nil (i.e. you have given a
+prefix argument), the current environment is modified and no new
+environment is inserted.
+@end deffn
+As a default selection, @AUCTeX{} will suggest the environment last
+inserted or, as the first choice the value of the variable
+@defopt LaTeX-default-environment
+Default environment to insert when invoking @samp{LaTeX-environment}
+first time.
+@end defopt
+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.  @xref{Customizing environments}.
+* Equations::                   Equations
+* Floats::                      Floats
+* Itemize-like::                Itemize-like
+* Tabular-like::                Tabular-like
+* Customizing environments::    Customizing environments
+@end menu
+You can close the current environment with @kbd{C-c ]}, but we suggest
+that you use @kbd{C-c C-e} to insert complete environments instead.
+@deffn Command LaTeX-close-environment
+@kindex C-c ]
+(@kbd{C-c ]}) Insert an @samp{\end} that matches the current environment.
+@end deffn
+@node Equations
+@subsection Equations
+@cindex Equations
+@cindex Equation
+@cindex Eqnarray
+@cindex amsmath
+When inserting equation-like environments, the @samp{\label} will have a
+default prefix, which is controlled by the following variables:
+@defopt LaTeX-equation-label
+Prefix to use for `equation' labels.
+@end defopt
+@defopt LaTeX-eqnarray-label
+Prefix to use for `eqnarray' labels.
+@end defopt
+@defopt LaTeX-amsmath-label
+Prefix to use for amsmath equation labels.  Amsmath equations include
+@samp{align}, @samp{alignat}, @samp{xalignat}, @samp{aligned},
+@samp{flalign} and @samp{gather}.
+@end defopt
+@node Floats
+@subsection Floats
+@cindex Floats
+@cindex Figures
+@cindex Figure environment
+@cindex Tables
+@cindex Table environment
+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.
+@table @var
+@item 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 @samp{htbp} as described in the @LaTeX{} manual.  The
+value will default to the value of @code{LaTeX-float}.
+@vindex LaTeX-float
+@item caption
+This is the caption of the float.  The default is to insert the caption
+at the bottom of the float.  You can specify floats where the caption
+should be placed at the top with @code{LaTeX-top-caption-list}.
+@vindex LaTeX-top-caption-list
+@item label
+The label of this float.  The label will have a default prefix, which is
+controlled by the variables @code{LaTeX-figure-label} and
+@vindex LaTeX-figure-label
+@vindex LaTeX-table-label
+@cindex Prefix for labels
+@cindex Label prefix
+@cindex Labels
+@end table
+Moreover, you will be asked if you want the contents of the float
+environment to be horizontally centered.  Upon a positive answer a
+@samp{\centering} macro will be inserted at the beginning of the float
+@defopt LaTeX-float
+Default placement for floats.
+@end defopt
+@defopt LaTeX-figure-label
+Prefix to use for figure labels.
+@end defopt
+@defopt LaTeX-table-label
+Prefix to use for table labels.
+@end defopt
+@defopt LaTeX-top-caption-list
+List of float environments with top caption.
+@end defopt
+@node Itemize-like
+@subsection Itemize-like
+@cindex Itemize
+@cindex Enumerates
+@cindex Descriptions
+@cindex Items
+@cindex \item
+In an itemize-like environment, nodes (i.e., @samp{\item}s) may be
+inserted using @kbd{C-c @key{LFD}}.
+@deffn Command LaTeX-insert-item
+@kindex C-c @key{LFD}
+(@kbd{C-c @key{LFD}}) Close the current item, move to the next line and
+insert an appropriate @samp{\item} for the current environment. That is,
+`itemize' and `enumerate' will have @samp{\item } inserted, while
+`description' will have @samp{\item[]} inserted.
+@end deffn
+@node Tabular-like
+@subsection Tabular-like
+When inserting Tabular-like environments, that is, `tabular' `array'
+etc., you will be prompted for a template for that environment.
+Related variables:
+@defopt LaTeX-default-format
+Default format string for array and tabular environments.
+@end defopt
+@defopt 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.
+@end defopt
+@node Customizing environments
+@subsection Customizing environments
+@xref{Adding Environments}, for how to customize the list of known
+@node Advanced Features
+@chapter Advanced Editing Features
+@cindex Advanced 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.
+* Mathematics::                 Entering Mathematics
+* Completion::                  Completion of macros
+* Commenting::                  Commenting text
+* Indenting::                   Reflecting syntactic constructs with whitespace
+* Filling::                     Automatic and manual line breaking
+@end menu
+@node Mathematics
+@section Entering Mathematics
+@cindex Mathematics
+@cindex Symbols
+@cindex Abbreviations
+@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 @kbd{C-c
+@deffn Command LaTeX-math-mode
+@kindex C-c ~
+(@kbd{C-c ~}) Toggle LaTeX Math mode.  This is a minor mode rebinding
+the key @code{LaTeX-math-abbrev-prefix} to allow easy typing of
+mathematical symbols.  @kbd{`} will read a character from the keyboard,
+and insert the symbol as specified in @code{LaTeX-math-default} and
+@code{LaTeX-math-list}.  If given a prefix argument, the symbol will be
+surrounded by dollar signs.
+@end deffn
+You can use another prefix key (instead of @kbd{`}) by  setting the
+variable @code{LaTeX-math-abbrev-prefix}.
+To enable LaTeX Math mode by default, add the following in your
+@file{.emacs} file:
+(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
+@end lisp
+@defopt LaTeX-math-abbrev-prefix
+A string containing the prefix of @code{LaTeX-math-mode} commands; This
+value defaults to @kbd{`}.
+The string has to be a key or key sequence in a format understood by the
+@code{kbd} macro.  This corresponds to the syntax usually used in the
+manuals for Emacs Emacs Lisp.
+@end defopt
+The variable @code{LaTeX-math-list} allows you to add your own mappings.
+@defopt LaTeX-math-list
+A list containing user-defined keys and commands to be used in LaTeX
+Math mode.  Each entry should be a list of two to four elements.
+First, the key to be used after @code{LaTeX-math-abbrev-prefix} for
+macro insertion.  If it is nil, the symbol has no associated
+keystroke (it is available in the menu, though).
+Second, a string representing the name of the macro (without a leading
+Third, a string representing the name of a submenu the command should be
+added to.  Use a list of strings in case of nested menus.
+Fourth, the position of a Unicode character to be displayed in the menu
+alongside the macro name.  This is an integer value.
+@end defopt
+@defopt 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.
+@end defopt
+@AUCTeX{}'s reference card @file{tex-ref.tex} includes a list of all
+math mode commands.
+@AUCTeX{} can help you write subscripts and superscripts in math
+constructs by automatically inserting a pair of braces after typing
+@key{_} or @key{^} respectively and putting point between the braces.
+In order to enable this feature, set the variable
+@code{TeX-electric-sub-and-superscript} to a non-nil value.
+@defopt TeX-electric-sub-and-superscript
+If non-nil, insert braces after typing @key{^} and @key{_} in math mode.
+@end defopt
+@node Completion
+@section Completion
+@cindex Completion
+@cindex Expansion
+@cindex Macro expansion
+@cindex Macro completion
+@cindex Macro arguments
+@cindex Arguments to @TeX{} macros
+Emacs lisp programmers probably know the @code{lisp-complete-symbol}
+command, usually bound to @kbd{M-@key{TAB}}.  Users of the wonderful
+ispell mode know and love the @code{ispell-complete-word} command from
+that package.  Similarly, @AUCTeX{} has a @code{TeX-complete-symbol}
+command, usually bound to @kbd{M-@key{TAB}}.  Using
+@code{LaTeX-complete-symbol} makes it easier to type and remember the
+names of long @LaTeX{} macros.
+In order to use @code{TeX-complete-symbol}, you should write a backslash
+and the start of the macro.  Typing @kbd{M-@key{TAB}} will now complete
+as much of the macro, as it unambiguously can.  For example, if you type
+`@samp{\renewc}' and then @kbd{M-@key{TAB}}, it will expand to
+@deffn Command TeX-complete-symbol
+@kindex M-@key{TAB}
+(@kbd{M-@key{TAB}})  Complete @TeX{} symbol before point.
+@end deffn
+A more direct way to insert a macro is with @code{TeX-insert-macro},
+bound to @kbd{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 @samp{\include}.
+Some examples are listed below.
+@deffn Command TeX-insert-macro
+@kindex C-c C-m
+(@kbd{C-c C-m} or @kbd{C-c RET}) Prompt (with completion) for the name
+of a @TeX{} macro, and if @AUCTeX{} knows the macro, prompt for each
+@end deffn
+As a default selection, @AUCTeX{} will suggest the macro last inserted
+or, as the first choice the value of the variable
+@defopt TeX-insert-macro-default-style
+Specifies whether @code{TeX-insert-macro} will ask for all optional
+If set to the symbol @code{show-optional-args}, @code{TeX-insert-macro}
+asks for optional arguments of @TeX{} macros.  If set to
+@code{mandatory-args-only}, @code{TeX-insert-macro} asks only for
+mandatory arguments.  When @code{TeX-insert-macro} is called with prefix
+argument (@kbd{C-u}), it's the other way round.
+Note that for some macros, there are special mechanisms, e.g.
+@end defopt
+@defopt TeX-default-macro
+Default macro to insert when invoking @code{TeX-insert-macro} first time.
+@end defopt
+A faster alternative is to bind the function @code{TeX-electric-macro}
+to @samp{\}.  This can be done by setting the variable
+@defopt TeX-electric-escape
+If this is non-nil when @AUCTeX{} is loaded, the @TeX{} escape
+character @samp{\} will be bound to @code{TeX-electric-macro}
+@end defopt
+The difference between @code{TeX-insert-macro} and
+@code{TeX-electric-macro} is that space will complete and exit from the
+minibuffer in @code{TeX-electric-macro}.  Use @key{TAB} if you merely
+want to complete.
+@deffn 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.
+@end deffn
+By default @AUCTeX{} will put an empty set braces @samp{@{@}} after a
+macro with no arguments to stop it from eating the next whitespace.
+This can be stopped by entering @code{LaTeX-math-mode},
+@pxref{Mathematics}, or by setting @code{TeX-insert-braces} to nil.
+@defopt TeX-insert-braces
+If non-nil, append a empty pair of braces after inserting a macro.
+@end defopt
+Completions work because @AUCTeX{} can analyze @TeX{} files, and store
+symbols in emacs lisp files for later retrieval.  @xref{Automatic}, for
+more information.
+@cindex \cite, completion of
+@cindex Bib@TeX{}, completion
+@cindex cite, completion of
+@cindex bibliography, completion
+@cindex citations, completion of
+@cindex \label, completion
+@cindex \ref, completion
+@cindex labels, completion of
+@AUCTeX{} will also make completion for many macro arguments, for
+example existing labels when you enter a @samp{\ref} macro with
+@code{TeX-insert-macro} or @code{TeX-electric-macro}, and Bib@TeX{}
+entries when you enter a @samp{\cite} macro.  For this kind of
+completion to work, parsing must be enabled as described in
+@pxref{Parsing Files}.  For @samp{\cite} you must also make sure that
+the Bib@TeX{} files have been saved at least once after you enabled
+automatic parsing on save, and that the basename of the Bib@TeX{} file
+does not conflict with the basename of one of @TeX{} files.
+@node Commenting
+@section Commenting
+It is often necessary to comment out temporarily a region of @TeX{} or
+@LaTeX{} code.  This can be done with the commands @kbd{C-c ;} and
+@kbd{C-c %}.  @kbd{C-c ;} will comment out all lines in the current
+region, while @kbd{C-c %} will comment out the current paragraph.
+Type @kbd{C-c ;} again to uncomment all lines of a commented region,
+or @kbd{C-c %} again to uncomment all comment lines around point.
+These commands will insert or remove a single @samp{%} respectively.
+@deffn Command TeX-comment-or-uncomment-region
+@kindex C-c ;
+(@kbd{C-c ;}) Add or remove @samp{%} 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
+@code{TeX-comment-region} and @code{TeX-uncomment-region} can be used
+to explicitly comment or uncomment the region in concern.
+@end deffn
+@deffn Command TeX-comment-or-uncomment-paragraph
+@kindex C-c %
+(@kbd{C-c %}) Add or remove @samp{%} from the beginning of each line
+in the current paragraph.  When removing @samp{%} characters the
+paragraph is considered to consist of all preceding and succeeding
+lines starting with a @samp{%}, until the first non-comment line.
+@end deffn
+@node Indenting
+@section Indenting
+@cindex Formatting
+@cindex Indenting
+@cindex Indentation
+@cindex Reformatting
+@cindex Reindenting
+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
+@code{LaTeX-indent-level} (default 2).  Also, items of an `itemize-like'
+environment are indented by the value of @code{LaTeX-item-indent},
+default @minus{}2.  If more environments are nested, they are indented
+`accumulated' just like most programming languages usually are seen
+indented in nested constructs.
+@vindex LaTeX-indent-level
+@vindex LaTeX-item-indent
+You can explicitely indent single lines, usually by pressing @key{TAB},
+or marked regions by calling @code{indent-region} on it.  If you have
+@code{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 @key{RET}, you can
+customize the variable @code{TeX-newline-function} and change the
+default of @code{newline} which does no indentation to
+@code{newline-and-indent} which indents the new line or
+@code{reindent-then-newline-and-indent} which indents both the current
+and the new line.
+@vindex TeX-newline-function
+There are certain @LaTeX{} environments which should be indented in a
+special way, like @samp{tabular} or @samp{verbatim}.  Those environments
+may be specified in the variable @code{LaTeX-indent-environment-list}
+together with their special indentation functions.  Taking the
+@samp{verbatim} environment as an example you can see that
+@code{current-indentation} is used as the indentation function.  This
+will stop @AUCTeX{} from doing any indentation in the environment if you
+hit @key{TAB} for example.
+@vindex LaTeX-indent-environment-list
+There are environments in @code{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. (@xref{Filling}, for further information about the filling
+@vindex LaTeX-indent-environment-list
+The check for the indentation function may be enabled or disabled by
+customizing the variable @code{LaTeX-indent-environment-check}.
+@vindex LaTeX-indent-environment-check
+As a side note with regard to formatting special environments: Newer
+Emacsen include @file{align.el} and therefore provide some support for
+formatting @samp{tabular} and @samp{tabbing} environments with the
+function @code{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
+@code{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.
+@vindex LaTeX-syntactic-comments
+Following you will find a list of most commands and variables related
+to indenting with a small summary in each case:
+@table @kbd
+@item @key{TAB}
+@kindex @key{TAB}
+@findex LaTeX-indent-line
+@code{LaTeX-indent-line} will indent the current line.
+@item @key{LFD}
+@kindex @key{LFD}
+@code{newline-and-indent} inserts a new line (much like @key{RET}) and
+moves the cursor to an appropriate position by the left margin.
+Most keyboards nowadays don't have a linefeed key and @kbd{C-j} is
+tedious to type.  Therefore you can customize @AUCTeX{} to perform
+indentation (or to make coffee) upon typing @key{RET} as well.  The
+respective option is called @code{TeX-newline-function}.
+@item C-j
+@kindex C-j
+Alias for @key{LFD}
+@end table
+@defopt 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
+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.
+@end defopt
+@defopt LaTeX-indent-level
+Number of spaces to add to the indentation for each @samp{\begin} not
+matched by a @samp{\end}.
+@end defopt
+@defopt LaTeX-item-indent
+Number of spaces to add to the indentation for @samp{\item}'s in list
+@end defopt
+@defopt TeX-brace-indent-level
+Number of spaces to add to the indentation for each @samp{@{} not
+matched by a @samp{@}}.
+@end defopt
+@defopt LaTeX-syntactic-comments
+If non-nil comments will be filled and indented according to @LaTeX{}
+syntax.  Otherwise they will be filled like normal text.
+@end defopt
+@defopt TeX-newline-function
+Used to specify the function which is called when @key{RET} is pressed.
+This will normally be @code{newline} which simply inserts a new line.
+In case you want to have @AUCTeX{} do indentation as well when you press
+@key{RET}, use the built-in functions @code{newline-and-indent} or
+@code{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 @key{LFD}.  The latter
+function additionally indents the current line.  If you choose
+@samp{Other}, you can specify your own fancy function to be called when
+@key{RET} is pressed.
+@end defopt
+@node Filling
+@section Filling
+@cindex Filling
+@cindex Formatting
+@cindex Reformatting
+@cindex Refilling
+Filling deals with the insertion of line breaks to prevent lines from
+becoming wider than what is specified in @code{fill-column}.  The
+linebreaks will be inserted automatically if @code{auto-fill-mode} is
+enabled.  In this case the source is not only filled but also indented
+automatically as you write it.
+@c Describe hooks at another suitable place!
+@code{auto-fill-mode} can be enabled for @AUCTeX{} by calling
+@code{turn-on-auto-fill} in one of the hooks @AUCTeX{} is running.  For
+all text modes with @code{text-mode-hook}, for all @AUCTeX{} modes with
+@code{TeX-mode-hook} or for specific modes with
+@code{plain-TeX-mode-hook}, @code{LaTeX-mode-hook},
+@code{ConTeXt-mode-hook} or @code{docTeX-mode-hook}.  As an example, if
+you want to enable @code{auto-fill-mode} in @code{LaTeX-mode}, put the
+following into your init file:
+(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
+@end lisp
+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
+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
+@code{LaTeX-fill-break-before-code-comments}.  If you have overfull
+lines with code comments you can fill those explicitely by calling
+@code{LaTeX-fill-paragraph} or pressing @kbd{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 @kbd{M-q} only acts on the
+current line and not on the whole paragraph.
+Lines with @samp{\par} are treated similarly to code comments,
+i.e. @samp{\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
+Paragraph commands like @samp{\section} or @samp{\noindent} (the list of
+commands is defined by @code{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.
+@vindex LaTeX-paragraph-commands
+Here are some examples:
+  text text text text
+@end example
+  text text text text
+@end example
+If you press @kbd{M-q} on the first line in both examples, nothing will
+change.  But if you write
+\begin@{quote@} text
+  text text text text
+@end example
+and press @kbd{M-q}, you will get
+\begin@{quote@} text text text text text
+@end example
+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 @code{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.
+@findex LaTeX-fill-environment
+The relevant commands and variables with regard to filling are:
+@table @kbd
+@item C-c C-q C-p
+@kindex C-c C-q C-p
+@findex LaTeX-fill-paragraph
+@code{LaTeX-fill-paragraph} will fill and indent the current paragraph.
+@item M-q
+@kindex M-q
+Alias for @kbd{C-c C-q C-p}
+@item C-c C-q C-e
+@kindex C-c C-q C-e
+@findex LaTeX-fill-environment
+@code{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.
+@item C-c C-q C-s
+@kindex C-c C-q C-s
+@findex LaTeX-fill-section
+@code{LaTeX-fill-section} will fill and indent the current logical
+sectional unit.
+@item C-c C-q C-r
+@kindex C-c C-q C-r
+@findex LaTeX-fill-region
+@code{LaTeX-fill-region} will fill and indent the current region.
+@end table
+@defopt 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 (@samp{$}, @samp{\(},
+@samp{\)}) and switches for display math (@samp{\[}, @samp{\]}).  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.
+@end defopt
+@defopt 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
+@code{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.
+@end defopt
+@node Display
+@chapter Controlling Screen Display
+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
+* Font Locking::                Font Locking
+* Folding::                     Folding Macros and Environments
+* Outline::                     Outlining the Document
+@end menu
+@node Font Locking
+@section Font Locking
+@cindex Font Locking
+@cindex Syntax Highlighting
+@cindex font-latex
+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
+@ref{Font Lock, , Font Lock Mode, emacs, GNU Emacs Manual}.
+@defopt 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 @fontlatex{}
+are activated by default.  You can switch to a different font locking
+scheme or disable font locking in @AUCTeX{} by customizing the variable
+Besides @fontlatex{} @AUCTeX{} ships with a scheme which is derived
+from Emacs' default @LaTeX{} mode and activated by choosing
+@code{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 @fontlatex{} being much more feature-rich the following
+explanations will only cover @fontlatex{}.
+In case you want to hook in your own fontification scheme, you can
+choose @code{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 @code{ignore}.
+@end defopt
+@fontlatex{} provides many options for customization which are
+accessible with @kbd{M-x customize-group RET font-latex RET}.  For this
+description the various options are explained in conceptional groups.
+@heading Macros
+Highlighting of macros can be customized by adapting keyword lists which
+can be found in the customization group @code{font-latex-keywords}.  The
+lists contain names of macros without the leading backslash.
+Three types of macros can be handled differently with respect to
+Commands of the form @samp{\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
+@code{font-lock-keyword-face} will be used and for the optional
+arguments the face @code{font-lock-variable-name-face}.  The face
+applied to the mandatory argument depends on the macro class represented
+by the respective built-in variables.
+Declaration macros of the form @samp{@{\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 @code{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.
+Simple macros of the form @samp{\foo} which do not have any arguments or
+groupings.  The respective face will be applied to the macro itself.
+@end enumerate
+@subheading General macro classes
+@fontlatex{} provides keyword lists for different macro classes which
+are described in the following table:
+@vindex font-latex-match-function-keywords
+@vindex font-latex-match-reference-keywords
+@vindex font-latex-match-textual-keywords
+@vindex font-latex-match-variable-keywords
+@vindex font-latex-match-warning-keywords
+@table @code
+@item font-latex-match-function-keywords
+Keywords for macros defining or related to functions, like
+Type: @samp{\macro[...]@{...@}}@*
+Face: @code{font-lock-function-name-face}
+@item font-latex-match-reference-keywords
+Keywords for macros defining or related to references, like
+Type: @samp{\macro[...]@{...@}}@*
+Face: @code{font-lock-constant-face}
+@item font-latex-match-textual-keywords
+Keywords for macros specifying textual content, like @samp{\caption}.@*
+Type: @samp{\macro[...]@{...@}}@*
+Face: @code{font-lock-type-face}
+@item font-latex-match-variable-keywords
+Keywords for macros defining or related to variables, like
+Type: @samp{\macro[...]@{...@}@{...@}}@*
+Face: @code{font-lock-variable-name-face}
+@item font-latex-match-warning-keywords
+Keywords for important macros, e.g. affecting line or page break, like
+Type: @samp{\macro}@*
+Face: @code{font-latex-warning-face}
+@end table
+@subheading Sectioning commands
+@cindex Sectioning commands, fontification of
+Sectioning commands are macros like @samp{\chapter} or @samp{\section}.
+For these commands there are two fontification schemes which may be
+selected by customizing the variable @code{font-latex-fontify-sectioning}.
+@defopt font-latex-fontify-sectioning
+@c Is @vindex correct?
+@vindex font-latex-sectioning-0-face
+@vindex font-latex-sectioning-1-face
+@vindex font-latex-sectioning-2-face
+@vindex font-latex-sectioning-3-face
+@vindex font-latex-sectioning-4-face
+@vindex font-latex-sectioning-5-face
+Per default sectioning commands will be shown in a larger, proportional
+font, which corresponds to a number for this variable.  The font size
+varies with the sectioning level, e.g. @samp{\part}
+(@code{font-latex-sectioning-0-face}) has a larger font than
+@samp{\paragraph} (@code{font-latex-sectioning-5-face}).  Typically,
+values from 1.05 to 1.3 for @code{font-latex-fontify-sectioning} give
+best results, depending on your font setup.  If you rather like to use
+the base font and a different color, set the variable to the symbol
+@samp{color}.  In this case the face @code{font-lock-type-face} will be
+used to fontify the argument of the sectioning commands.
+@end defopt
+@vindex font-latex-match-sectioning-0-keywords
+@vindex font-latex-match-sectioning-1-keywords
+@vindex font-latex-match-sectioning-2-keywords
+@vindex font-latex-match-sectioning-3-keywords
+@vindex font-latex-match-sectioning-4-keywords
+@vindex font-latex-match-sectioning-5-keywords
+You can make @fontlatex{} aware of your own sectioning commands be
+adding them to the keyword lists:
+(@code{font-latex-sectioning-0-face}) @dots{}
+@vindex font-latex-slide-title-face
+@vindex font-latex-match-slide-title-keywords
+Related to sectioning there is special support for slide titles which
+may be fontified with the face @code{font-latex-slide-title-face}.  You
+can add macros which should appear in this face by customizing the
+variable @code{font-latex-match-slide-title-keywords}.
+@subheading Commands for changing fonts
+@LaTeX{} provides various macros for changing fonts or font attributes.
+For example, you can select an italic font with @samp{\textit@{...@}} or
+bold with @samp{\textbf@{...@}}.  An alternative way to specify these
+fonts is to use special macros in @TeX{} groups, like @samp{@{\itshape
+...@}} for italics and @samp{@{\bfseries ...@}} for bold.  As mentioned
+above, we call the former variants commands and the latter
+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 @fontlatex{}, different
+keyword lists per type style and macro type are provided for entering
+your own macros which are listed in the table below.
+@vindex font-latex-match-bold-command-keywords
+@vindex font-latex-match-italic-command-keywords
+@vindex font-latex-match-math-command-keywords
+@vindex font-latex-match-type-command-keywords
+@vindex font-latex-match-bold-declaration-keywords
+@vindex font-latex-match-italic-declaration-keywords
+@vindex font-latex-match-type-declaration-keywords
+@table @code
+@item font-latex-match-bold-command-keywords
+Keywords for commands specifying a bold type style.@*
+Face: @code{font-latex-bold-face}
+@item font-latex-match-italic-command-keywords
+Keywords for commands specifying an italic font.@*
+Face: @code{font-latex-italic-face}
+@item font-latex-match-math-command-keywords
+Keywords for commands specifying a math font.@*
+Face: @code{font-latex-math-face}
+@item font-latex-match-type-command-keywords
+Keywords for commands specifying a typewriter font.@*
+Face: @code{font-lock-type-face}
+@item font-latex-match-bold-declaration-keywords
+Keywords for declarations specifying a bold type style.@*
+Face: @code{font-latex-bold-face}
+@item font-latex-match-italic-declaration-keywords
+Keywords for declarations specifying an italic font.@*
+Face: @code{font-latex-italic-face}
+@item font-latex-match-type-declaration-keywords
+Keywords for declarations specifying a typewriter font.@*
+Face: @code{font-latex-type-face}
+@end table
+@subheading Deactivating defaults of built-in keyword classes
+@vindex font-latex-deactivated-keyword-classes
+@fontlatex{} ships with predefined lists of keywords for the classes
+described above.  You can disable these defaults per class by
+customizing the variable @code{font-latex-deactivated-keyword-classes}.
+This is a list of strings for keyword classes to be deactivated.  Valid
+entries are \"warning\", \"variable\", \"reference\", \"function\" ,
+\"sectioning-0\", \"sectioning-1\", \"sectioning-2\", \"sectioning-3\",
+\"sectioning-4\", \"sectioning-5\", \"textual\", \"bold-command\",
+\"italic-command\", \"math-command\", \"type-command\",
+\"bold-declaration\", \"italic-declaration\", \"type-declaration\".
+You can also get rid of certain keywords only.  For example if you want
+to remove highlighting of footnotes as references you can put the
+following stanza into your init file:
+(eval-after-load "font-latex"
+  '(setq-default
+    font-latex-match-reference-keywords-local
+    (remove "footnote" font-latex-match-reference-keywords-local)))
+@end lisp
+But note that this means fiddling with @fontlatex{}'s internals and is
+not guaranteed to work in future versions of @fontlatex{}.
+@subheading 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 @code{font-latex-user-keyword-classes}.
+@defopt 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.
+@end defopt
+@heading Quotes
+@cindex Quotes, fontification of
+Text in quotation marks is displayed with the face
+@code{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 @code{font-latex-quotes} to tell @fontlatex{}
+which type you are using if the correct value cannot be derived from
+document properties.
+@defopt font-latex-quotes
+The default value of @code{font-latex-quotes} is @samp{auto} which means
+that @fontlatex{} will try to derive the correct type of quotation mark
+matching from document properties like the language option supplied to
+the babel @LaTeX{} package.
+If the automatic detection fails for you and you mostly use one specific
+style you can set it to a specific language-dependent value as well.
+Set the value to @samp{german} if you are using >>German quotes<< and to
+@samp{french} if you are using << French quotes >>.  @fontlatex{} will
+recognize the different ways these quotes can be given in your source
+code, i.e. (@samp{"<}, @samp{">}), (@samp{<<}, @samp{>>}) and the
+respective 8-bit variants.
+@end defopt
+@heading Subscript and superscript in math
+@cindex Subscript, fontification of
+@cindex Superscript, fontification of
+In order to make math constructs more readable, @fontlatex{} displays
+subscript and superscript parts in a smaller font and raised or lowered
+respectively.  This fontification feature can be controlled with the
+variables @code{font-latex-fontify-script} and
+@defopt font-latex-fontify-script
+If non-nil, fontify subscript and superscript strings.
+Note that this feature is not available on XEmacs, for which 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.
+@end defopt
+@defopt 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 @ref{Other Display Specs, , Other
+Display Specifications, elisp, GNU Emacs Lisp Reference Manual}.
+@end defopt
+@heading Verbatim macros and environments
+@cindex Verbatim, fontification of
+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 @code{font-latex-verbatim-face}.
+@vindex LaTeX-verbatim-macros-with-delims
+@vindex LaTeX-verbatim-macros-with-braces
+@vindex LaTeX-verbatim-environments
+@fontlatex{} differentiates three different types of verbatim
+constructs for fontification.  Macros with special characters like | as
+delimiters, macros with braces, and environments.  Which macros and
+environments are recognized is controlled by the variables
+@code{LaTeX-verbatim-macros-with-braces}, and
+@code{LaTeX-verbatim-environments} respectively.
+@heading 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 @fontlatex{} provide mechanisms for
+multi-line fontification which can be controlled by the variable
+@defopt font-latex-do-multi-line
+Control multi-line fontification.
+Setting the variable to t will enable @fontlatex{}'s mechanism, setting
+it to nil will disable it.  Setting it to @samp{try-font-lock} (the
+default) will use font-lock's mechanism if available and @fontlatex{}'s
+method if not.
+Setting this variable will only have effect after resetting buffers
+controlled by @fontlatex{} or restarting Emacs.
+@end defopt
+@heading Faces
+@cindex Faces
+In case you want to change the colors and fonts used by @fontlatex{}
+please refer to the faces mentioned in the explanations above and use
+@kbd{M-x customize-face RET <face> RET}.  All faces defined by
+@fontlatex{} are accessible through a customization group by typing
+@kbd{M-x customize-group RET font-latex-highlighting-faces RET}.
+@node Folding
+@section Folding Macros and Environments
+@cindex Outlining
+@cindex Folding
+@cindex Reveal
+@cindex Auto-Reveal
+@cindex Hide Macros
+A popular complaint about markup languages like @TeX{} and @LaTeX{} is
+that there is too much clutter in the source text and that one cannot
+focus well on the content.  There are macros where you are only
+interested in the content they are enclosing, like font specifiers where
+the content might already be fontified in a special way by font locking.
+Or macros the content of which you only want to see when actually
+editing it, like footnotes or citations.  Similarly you might find
+certain environments or comments distracting when trying to concentrate
+on the body of your document.
+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
+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 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{}
+In order to use this feature, you have to activate @code{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 @kbd{M-x TeX-fold-mode RET} or
+using the keyboard shortcut @kbd{C-c C-o C-f}.  If you want to use it
+every time you edit a @LaTeX{} document, add it to a hook:
+@findex TeX-fold-mode
+@kindex C-c C-o C-f
+(add-hook 'LaTeX-mode-hook (lambda ()
+                             (TeX-fold-mode 1)))
+@end lisp
+If it should be activated in all @AUCTeX{} modes, use
+@code{TeX-mode-hook} instead of @code{LaTeX-mode-hook}.
+Once the mode is active there are several commands available to hide
+and show macros, environments and comments:
+@deffn Command TeX-fold-buffer
+@kindex C-c C-o C-b
+(@kbd{C-c C-o C-b}) Hide all foldable items in the current buffer
+according to the setting of @code{TeX-fold-type-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
+@end deffn
+@defopt TeX-fold-type-list
+List of symbols determining the item classes to consider for folding.
+This can be macros, environments and comments.  Per default only macros
+and environments are folded.
+@end defopt
+@defopt TeX-fold-force-fontify
+In order for all folded content to get the right faces, the whole buffer
+has to be fontified before folding is carried out.
+@code{TeX-fold-buffer} therefore will force fontification of unfontified
+regions.  As this will prolong the time folding takes, you can prevent
+forced fontification by customizing the variable
+@end defopt
+@defopt TeX-fold-preserve-comments
+By default items found in comments will be folded.  If your comments
+often contain unfinished code this might lead to problems.  Give this
+variable a non-nil value and foldable items in your comments will be
+left alone.
+@end defopt
+@deffn Command TeX-fold-region
+@kindex C-c C-o C-r
+(@kbd{C-c C-o C-r}) Hide all configured macros in the marked region.
+@end deffn
+@deffn Command TeX-fold-paragraph
+@kindex C-c C-o C-p
+(@kbd{C-c C-o C-p}) Hide all configured macros in the paragraph
+containing point.
+@end deffn
+@deffn Command TeX-fold-macro
+@kindex C-c C-o C-m
+(@kbd{C-c C-o C-m}) Hide the macro on which point currently is located.
+If the name of the macro is found in @code{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 (@code{TeX-fold-unspec-macro-display-string}) will be
+shown, depending on the value of the variable
+@end deffn
+@deffn Command TeX-fold-env
+@kindex C-c C-o C-e
+(@kbd{C-c C-o C-e}) Hide the environment on which point currently is
+located.  The behavior regarding the display string is analogous to
+@code{TeX-fold-macro} and determined by the variables
+@code{TeX-fold-env-spec-list} and
+@code{TeX-fold-unspec-env-display-string} respectively.
+@end deffn
+@deffn Command TeX-fold-comment
+@kindex C-c C-o C-c
+(@kbd{C-c C-o C-c}) Hide the comment point is located on.
+@end deffn
+@deffn Command TeX-fold-clearout-buffer
+@kindex C-c C-o b
+(@kbd{C-c C-o b}) Permanently unfold all macros and environments in the
+current buffer.
+@end deffn
+@deffn Command TeX-fold-clearout-region
+@kindex C-c C-o r
+(@kbd{C-c C-o r}) Permanently unfold all macros and environments in the
+marked region.
+@end deffn
+@deffn Command TeX-fold-clearout-paragraph
+@kindex C-c C-o p
+(@kbd{C-c C-o p}) Permanently unfold all macros and environments in the
+paragraph containing point.
+@end deffn
+@deffn Command TeX-fold-clearout-item
+@kindex C-c C-o i
+(@kbd{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