bug-auctex
[Top][All Lists]
Advanced

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

bug#65648: 13.2; indentation of nested environments


From: Paul Nelson
Subject: bug#65648: 13.2; indentation of nested environments
Date: Mon, 4 Sep 2023 10:34:52 +0200

Hi Ikumi,

Thanks for sharing your tentative patch.

The "always-align nil" behavior looks good to me.

As for the "always-align t" case, there are still some natural "broken" examples, as you know:

#+begin_src latex
\begin{equation*}
  g = \begin{pmatrix}
        a & b \\
        c & d \\
      \end{pmatrix},
      \quad
      h = \begin{pmatrix}
            x & y \\
            z & w \\
          \end{pmatrix}.
\end{equation*}
#+end_src

#+begin_src latex
The matrix $\begin{pmatrix}
              a & b \\
              c & d
            \end{pmatrix}$ has determinant
            \begin{equation*}
              a d - b c.
            \end{equation*}

            The matrix $\begin{pmatrix}
                          a & b \\
                          c & d
                        \end{pmatrix}$ has determinant
                        \begin{equation*}
                          a d - b c.
                        \end{equation*}

                        The matrix $\begin{pmatrix}
                                      a & b \\
                                      c & d
                                    \end{pmatrix}$ has determinant
                                    \begin{equation*}
                                      a d - b c.
                                    \end{equation*}
#+end_src


With a bit more massaging, it should be possible to avoid these.  I had in mind modifying LaTeX-indent-level-count (or the block surrounding where it is called) in \end{TABULAR} cases, adjusting by the difference between the matching \begin and its beginning of line.

Paul





reply via email to

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