If you wish to wish to expand certain environments differently from
the way Latex-Suite does it, you can define custom expansions using global
variables of the form Tex_Env_{name} where
name corresponds to the environment.
For example, if you press <F5> after typing
theorem, Latex-Suite will by default expand it to
\begin{theorem}
\label{<++>}<++>
\end{theorem}<++>However, if you wish change this to
\begin{theorem}
<++>
\end{theorem}<++>then define the following variable
let g:Tex_Env_theorem = "\\begin{theorem}\<CR><++>\<CR>\\end{theorem}"
If the expansion uses special keys such as carriage return etc, then
use double-quotes and use the "\<key>"
notation for special keys. Backslashes have to be doubled.
You could even use strings returned by functions as the expansion by using the IMAP_PutTextWithMovement() function.
If the name of the environment contains special characters (for
example, the eqnarray* environment), then use the
following form:
let g:Tex_Env_{'eqnarray*'} =
\ "\\begin{eqnarray*}\<CR><++> &=& <++>\<CR>\\end{eqnarray*}<++>"
This will make pressing <F5> after
eqnarray* expand to
\begin{eqnarray*}
<++> &=& <++>
\end{eqnarray*}<++>
If you wish to define new expansions for fast command insertion as
described here, or redefine
expansions from the default values in Latex-Suite, you will need to define
variables of the form g:Tex_Com_{name} where
name is a command name. For example, with the
setting
let g:Tex_Com_frac = "\\frac{<++>}{<++>}<++>"
pressing <F7> after typing
frac will change it to \frac{<++>}{<++>}<++>
See Tex_Env_name for additional details on how to create this setting in various special circumstances.
The following variables disable various parts of the macro functionality of Latex-Suite. See the links to the relevant sections to see what functionality setting each of the variables to zero will take away.
| Setting | Link to relevant section | Default Value |
|---|---|---|
g:Tex_EnvironmentMaps
| Environment Mappings | 1 |
g:Tex_EnvironmentMenus | 1 | |
g:Tex_FontMaps | Font Mappings | 1 |
g:Tex_FontMenus | 1 | |
g:Tex_SectionMaps | Section Mappings | 1 |
g:Tex_SectionMenus | 1 |
| Type | Boolean |
| Default Value | 0 |
If this variable is set to 1, then when an environment is chosen from the menu then for selected environments, Latex-Suite asks a series of questions on the command line and inserts a template with the corresponding fields already filled in. Setting this to zero will insert a template with place-holders marking off the places where fields need to be filled.
| Type | boolean |
| Default Value | 0 |
This option when set to 1, temporarily freezes Latex-Suite's macro expansion. It might be useful when you are using some other keymap which is causing excessive macro expansion. Use a buffer-local variable of the same name if you wish to affect just the present buffer.
| Type | Boolean |
| Default Value | 1 |
With so many visual maps, its helpful to have a way of catching typing
errors made in visual mode. What this does is to prompt you to correct
your visual mode mapping if you start out with g:Tex_Leader and then type some
illegal keys. It basically maps just the g:Tex_Leader
character to a function.
| Type | String |
| Default Value | '`' |
The mappings in Latex-Suite are by default prefixed with the back-tick
character. For example, `/ inserts
\frac{<++>}{<++>}<++> etc. You can change the
prefix with the following setting.
',', '/',
'`' are preferred values. '' or
'\' will lead to a lot of
trouble.
g:Tex_Leader is also used for visual mode mappings for fonts.
| Type | String |
| Default Value | ',' |
In order to avoid clashes between the large number of visual mode macros
provided, the visual mode
macros for environments and sections start with a character
different from g:Tex_Leader.
| Type | String |
| Default Value | 'eqnarray*,eqnarray,equation,equation*,\[,$$,align,align*' |
This string represents a comma separated list of fields corresponding to
environments. Pressing <F5> in insert-mode in
the body of the document asks you to choose from one of these
environments to insert.
Leaving this string empty will leave the <F5>
key unmapped
| Type | String |
| Default Value | 'eqnarray*,eqnarray,bmatrix' |
This string represents a comma separated list of environments which are
mapped to <Shift-F-1> through
<Shift-F-4>. For example, pressing
<Shift-F-2> with this setting inserts the
eqnarray environment.
Leaving this string empty will leave <Shift-F-1> through
<Shift-F-4> unmapped.
Only the first four fields of this list are used. The rest are silently ignored.
| Type | String |
| Default Value |
'footnote,cite,pageref,label'
|
This string represents a comma separated list of LaTeX commands
which Latex-Suite uses for the <F7> and
<S-F7> maps as described here.
Leaving this string empty will leave the <F7>
key unmapped.
This setting affects the style which Latex-Suite uses to insert an
\item when <Alt-I> is
pressed as described here. By default
Latex-Suite defines styles for the following environments:
| Environment | Style |
|---|---|
| itemize | \item |
| enumerate | \item |
| theindex | \item |
| thebibliography | \item[<+biblabel+>]{<+bibkey+>} <++> |
| description | \item[<+label+>] <++> |
Each style is defined by a variable of the form
g:Tex_ItemStyle_{envname} where
envname is the name of the environment for which
the style is defined. For example, by default
g:Tex_ItemStyle_description = '\item[<+label+>] <++>'
Redefining the style for a particular environment or defining a style for an entirely new environment is simply a matter of setting the value of a variable of the corresponding name.