auctex: Environments
2.4 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.
Most of these are described further in the following sections, and
you may easily specify more. Customizing Environments.
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.
AUCTeX helps you adding labels to environments which use them, such
as 'equation', 'figure', 'table', etc... When you insert one of the
supported environments with 'C-c C-e', you will be automatically
prompted for a label. You can select the prefix to be used for such
environments with the 'LaTeX-label-alist' variable.
-- User Option: LaTeX-label-alist
List the prefixes to be used for the label of each supported
environment.
This is an alist whose car is the environment name, and the cdr
either the prefix or a symbol referring to one.
If the name is not found, or if the cdr is nil, no label is
automatically inserted for that environment.
If you want to automatically insert a label for a environment but
with an empty prefix, use the empty string '""' as the cdr of the
corresponding entry.
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. When the current environment is 'document', it is
overriden by 'LaTeX-default-document-environment'.
-- Variable: LaTeX-default-document-environment
Default environment when invoking 'LaTeX-environment' and the
current environment is 'document'. It is intended to be used in
LaTeX class style files. For example, in 'beamer.el' it is set to
'frame', in 'letter.el' to 'letter', and in 'slides.el' to 'slide'.
If the document is empty, or the cursor is placed at the top of the
document, AUCTeX will default to insert a 'document' environment
prompting also for the insertion of '\documentclass' and '\usepackage'
macros. You will be prompted for a new package until you enter nothing.
If you do not want to insert any '\usepackage' at all, just press <RET>
at the first 'Packages' prompt.
AUCTeX distinguishes normal and expert environments. By default, it
will offer completion only for normal environments. This behavior is
controlled by the user option 'TeX-complete-expert-commands'.
-- User Option: TeX-complete-expert-commands
Complete macros and environments marked as expert commands.
Possible values are nil, t, or a list of style names.
nil
Don't complete expert commands (default).
t
Always complete expert commands.
(STYLES ...)
Only complete expert commands of STYLES.
Menu