















* doc/auctex.texi (Adding Environments): Sort environment hooks alphabetically. Add an entry for `LaTeX-env-document'. Shorten the entry for `LaTeX-env-item-args'. (Adding Environments): Use @dots{}.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 039a1b28159..756fdb9dd38 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -6117,16 +6117,42 @@ Following is a list of available hooks for
@code{LaTeX-add-environments}:
@ftable @code
+@item LaTeX-env-args
+Insert the given environment with arguments. You can use this as a hook
+in case you want to specify multiple complex arguments just like in
+elements of @code{TeX-add-symbols}. This is most useful if the
+specification of arguments to be prompted for with strings and strings
+wrapped in a vector as described above is too limited.
+
+Here is an example from @file{listings.el} which calls a function with
+one argument in order to prompt for a @samp{key=value} list to be inserted as
+an optional argument of the @samp{lstlisting} environment:
+
+@lisp
+(LaTeX-add-environments
+ '("lstlisting" LaTeX-env-args
+ [TeX-arg-key-val (LaTeX-listings-key-val-options)]))
+@end lisp
+
+@item LaTeX-env-array
+Insert the given array-like environment with position and column
+specifications.
+
+@item LaTeX-env-bib
+Insert the given environment with a label for a bibitem.
+
+@item LaTeX-env-document
+Insert a @samp{\documentclass} macro if there's none already and prompt
+for the insertion of @samp{\usepackage} macros.
+
@item LaTeX-env-item
Insert the given environment and the first item.
@item LaTeX-env-item-args
Insert the given environment plus further arguments, and the first item.
-You can use this as a hook in case you want to specify multiple complex
-arguments just like in elements of @code{TeX-add-symbols}. Here is an
-example from @file{enumitem.el} in order to prompt for a @samp{key=value}
-list to be inserted as an optional argument to the @samp{itemize}
-environment:
+Here is an example from @file{enumitem.el} in order to prompt for a
+@samp{key=value} list to be inserted as an optional argument to the
+@samp{itemize} environment:
@lisp
(LaTeX-add-environments
'("itemize" LaTeX-env-item-args
@@ -6136,10 +6162,6 @@ environment:
@item LaTeX-env-figure
Insert the given figure-like environment with a caption and a label.
-@item LaTeX-env-array
-Insert the given array-like environment with position and column
-specifications.
-
@item LaTeX-env-label
Insert the given environment with a label.
@@ -6155,42 +6177,23 @@ the first item.
Insert the given minipage-like environment with position and width
specifications.
-@item LaTeX-env-tabular*
-Insert the given tabular*-like environment with width, position and
-column specifications.
-
@item LaTeX-env-picture
Insert the given environment with width and height specifications.
-@item LaTeX-env-bib
-Insert the given environment with a label for a bibitem.
-
-@item LaTeX-env-args
-Insert the given environment with arguments. You can use this as a hook
-in case you want to specify multiple complex arguments just like in
-elements of @code{TeX-add-symbols}. This is most useful if the
-specification of arguments to be prompted for with strings and strings
-wrapped in a vector as described above is too limited.
-
-Here is an example from @file{listings.el} which calls a function with
-one argument in order to prompt for a @samp{key=value} list to be inserted as
-an optional argument of the @samp{lstlisting} environment:
-
-@lisp
-(LaTeX-add-environments
- '("lstlisting" LaTeX-env-args
- [TeX-arg-key-val (LaTeX-listings-key-val-options)]))
-@end lisp
+@item LaTeX-env-tabular*
+Insert the given tabular*-like environment with width, position and
+column specifications.
@end ftable
Some packages provide environments that are rarely useful to non-expert
users. Those should be marked as expert environments using
@code{LaTeX-declare-expert-environments}.
-@defun LaTeX-declare-expert-environments @var{style} @var{environments}...
+@defun LaTeX-declare-expert-environments @var{style} @var{environments} @dots{}
Declare @var{environments} as expert environments of @var{style}.
-Expert environments are completed depending on @code{TeX-complete-expert-commands}.
+Expert environments are completed depending on
+@code{TeX-complete-expert-commands}.
@end defun
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。