GNU bug report logs - #65648
13.2; indentation of nested environments

Previous Next

Package: auctex;

Reported by: Paul Nelson <ultrono <at> gmail.com>

Date: Thu, 31 Aug 2023 04:57:01 UTC

Severity: normal

Found in version 13.2

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 65648 <at> debbugs.gnu.org (full text, mbox):

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Paul Nelson <ultrono <at> gmail.com>
Cc: 65648 <at> debbugs.gnu.org, Uwe Brauer <oub <at> mat.ucm.es>
Subject: Re: bug#65648: 13.2; indentation of nested environments
Date: Sun, 03 Sep 2023 17:24:39 +0900
Hi Paul,

>>>>> Paul Nelson <ultrono <at> gmail.com> writes:
> A practical workaround for the user is to make sure that \begin{} is
> always the first non-whitespace on its line (and to enforce that
> requirement on coauthors via ~(defun fix-tex-buffer ...)~), but that
> seems suboptimal.

> The following seems to resolve the issue:

Thanks for your proposal. I think it can be a practical solution for
bug#54949[1] as well.

The proposal gives one failure for regression test, namely the case Uwe
Brauer raised last year[2]. Current AUCTeX indents
----------------------------------------------------------------------
\begin{equation}
  \begin{aligned}
&n u m=\left[\begin{array}{ll}
2 & 25
\end{array}\right] \\
&d e n=\left[\begin{array}{lll}
1 & 4 & 25
\end{array}\right]
\end{aligned}
\end{equation}
----------------------------------------------------------------------
into
----------------------------------------------------------------------
\begin{equation}
  \begin{aligned}
    &n u m=\left[\begin{array}{ll}
                   2 & 25
                 \end{array}\right] \\
    &d e n=\left[\begin{array}{lll}
                   1 & 4 & 25
                 \end{array}\right]
  \end{aligned}
\end{equation}
----------------------------------------------------------------------
while this proposal gives
----------------------------------------------------------------------
\begin{equation}
  \begin{aligned}
    &n u m=\left[\begin{array}{ll}
                   2 & 25
    \end{array}\right] \\
    &d e n=\left[\begin{array}{lll}
                   1 & 4 & 25
    \end{array}\right]
  \end{aligned}
\end{equation}
----------------------------------------------------------------------
, which seems me another reasonable behavior. Uwe, what do you think
about it? Is this result acceptable for you?

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54949
[2] https://lists.gnu.org/r/auctex-devel/2022-01/msg00055.html

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine




This bug report was last modified 1 year and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.