auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 7b0cbbb46562131b30581


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 7b0cbbb46562131b3058161b5323f79bc5ffa60c
Date: Sun, 20 Mar 2022 14:27:23 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  7b0cbbb46562131b3058161b5323f79bc5ffa60c (commit)
      from  89387874916f5b670fb6e16581eed44bd6e3503d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7b0cbbb46562131b3058161b5323f79bc5ffa60c
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Sat Mar 19 22:33:15 2022 +0900

    Document feature of []-induced indent
    
    * doc/auctex.texi (Indenting): Add description of two new options
    `TeX-indent-open-delimiters' and `TeX-indent-close-delimiters'.  Also
    Explain workarounds for unwanted side effects.

diff --git a/doc/auctex.texi b/doc/auctex.texi
index c5339097..a61ac541 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1724,6 +1724,51 @@ behavior you only need to remove @code{\|\[} and 
@code{\|\]} from
 @code{LaTeX-begin-regexp} and @code{LaTeX-end-regexp} variables
 respectively.
 
+A closely relevant topic is indenting of text enclosed in square brackets,
+parentheses and other pairs.  @AUCTeX{} offers two variables which control
+if indentation happens inside these pairs.
+
+@defopt TeX-indent-open-delimiters
+This variable contains additional opening delimiters which increase
+indentation.  For example add @code{[} to this variable to get text after
+a square bracket indented.
+@end defopt
+
+@defopt TeX-indent-close-delimiters
+This is the accompanying variable to @code{TeX-indent-open-delimiters}
+decreasing the indentation again.  This variable should contain @code{]}
+if @code{TeX-indent-open-delimiters} is set like described above.
+@end defopt
+
+@noindent
+Note that this is an opt-in feature, both variables are initially set to
+an empty string.  That is because it introduces non-trivial side effects
+to include @code{[} and @code{]} in @code{TeX-indent-open-delimiters} and
+@code{TeX-indent-close-delimiters}; if you only have an opening square
+bracket in your text without closing it, wrong indentation persists in the
+following text.  For example, in math expression, half-open intervals are
+frequently written as @samp{[0,10)} or @samp{[0,10[}.  In such cases, you
+can put the closing part as a comment in the same line in order to have
+correct indentation after that:
+@example
+$[0,10)$ % ]
+$[0,10[$ % ]]
+@end example
+
+Another example is @samp{\left}-@samp{\right} pair in equations.  Similar
+workarounds are available:
+@example
+\begin@{equation@}
+  \left[ % ]
+    xyz
+  \right] % [
+  abc
+\end@{equation@}
+@end example
+
+Note that commented curly braces @code{@{} and @code{@}} aren't counted
+when @AUCTeX{} computes indentation.
+
 @node Filling
 @section Filling
 @cindex Filling

-----------------------------------------------------------------------

Summary of changes:
 doc/auctex.texi | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]