[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 7b0cbbb465 38/60: Document featur
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 7b0cbbb465 38/60: Document feature of []-induced indent |
Date: |
Fri, 8 Apr 2022 11:52:52 -0400 (EDT) |
branch: externals/auctex
commit 7b0cbbb46562131b3058161b5323f79bc5ffa60c
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
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.
---
doc/auctex.texi | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index c53390973f..a61ac541cc 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
- [AUCTeX-diffs] [elpa] externals/auctex a2724f3677 15/60: Don't set syntax-propertize-function in defaults, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex a2724f3677 15/60: Don't set syntax-propertize-function in defaults, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e83ca6a072 57/60: Update style/doc.el to package version 3.0h, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex f9356664c8 23/60: Update documentation, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 78cf12b33c 18/60: ; * doc/auctex.texi: Adjust the year in @copying., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex c731038844 11/60: Improve regexp matching new environments, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 259ffc34c4 12/60: Use DEFAULT argument of `TeX-read-string' in styles, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 0ce906cfc7 32/60: Improve indentation of conditionals, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex b7d45e19c6 22/60: Discard obsolete hook, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 2b11084455 30/60: ; * style/l3doc.el (LaTeX-env-l3doc-function): Delete unused var., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 238dad67f9 04/60: Introduce DEFAULT argument in `TeX-arg-length', Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 7b0cbbb465 38/60: Document feature of []-induced indent,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 4b1c7015ae 45/60: Move contents of tex-buf.el into tex.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e032df90e7 05/60: Fix simultaneity, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex a078fda16b 06/60: ; * doc/auctex.texi (Starting a Command): Delete obosolete comment., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex b1a0d5df74 36/60: ; * style/algpseudocode.el: Fix position of TeX-dialect., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 1bc2630275 20/60: Don't change syntax of ^^A comments in doctex mode (bug#35140), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex fa8842c626 26/60: Recognize macrocode*? environments in doctex-mode, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 45aff50ff3 48/60: Support \mathcolor in style/x?color.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 5d2829aed4 49/60: Remove old defadvices (patch by Stefan Monnier), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 5cf46ff8e2 52/60: Improve parsing of re-definitions, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 03ed9004cd 60/60: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2022/04/08