[ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

## 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.

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. See 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.

 [ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

This document was generated by Ralf Angeli on January 13, 2013 using texi2html 1.82.