GNU bug report logs -
#65786
13.2; Indentation problem when left brace is closed with null
Previous Next
Reported by: James Tappin <jtappin <at> gmail.com>
Date: Wed, 6 Sep 2023 15:53:01 UTC
Severity: normal
Tags: notabug
Found in version 13.2
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 65786 <at> debbugs.gnu.org (full text, mbox):
James Tappin <jtappin <at> gmail.com> writes:
> When, within an equation environment, a \left\{ is closed with a
> \right. as with a display of alternative cases, the \end{equation}
> leaves the input indented by one level.
>
> Example:
> cumulative sum of the point to point phase shifts, after these are
> mapped into $-\pi < \Delta \phi_i \le \pi$, i.e.:
> \begin{equation}
> \label{eq:contiguation}
> \phi^{\mathrm{(c)}}_{\mathrm{i}} = \left\{
> \begin{array}[c]{lll}
> \phi^{\mathrm{(c)}}_{\mathrm{i-1}} +
> (\phi_{\mathrm{i}}-\phi_{\mathrm{i-1}}) & \mbox{if}
> & -\pi < \phi_{\mathrm{i}}-\phi_{\mathrm{i-1}} \leqslant \pi \\
> \phi^{\mathrm{(c)}}_{\mathrm{i-1}} +
> (\phi_{\mathrm{i}}-\phi_{\mathrm{i-1}}) - 2 \pi & \mbox{if}
> & \phi_{\mathrm{i}}-\phi_{\mathrm{i-1}} > \pi \\
> \phi^{\mathrm{(c)}}_{\mathrm{i-1}} +
> (\phi_{\mathrm{i}}-\phi_{\mathrm{i-1}}) + 2\pi & \mbox{if}
> & \phi_{\mathrm{i}}-\phi_{\mathrm{i-1}} \leqslant -\pi
> \end{array}
> \right. .
> \end{equation}
> This has the property that there are qualitative changes to the
> behaviour if aliasing occurs.
>
> Not sure if it is as simple as not counting \{ when computing the
> indentation or if that would open a whole other can of worms.
I put your example in a .tex file, marked it and 'M-x indent-region RET'
looks like this for me:
--8<---------------cut here---------------start------------->8---
Example:
cumulative sum of the point to point phase shifts, after these are
mapped into $-\pi < \Delta \phi_i \le \pi$, i.e.:
\begin{equation}
\label{eq:contiguation}
\phi^{\mathrm{(c)}}_{\mathrm{i}} = \left\{
\begin{array}[c]{lll}
\phi^{\mathrm{(c)}}_{\mathrm{i-1}} +
(\phi_{\mathrm{i}}-\phi_{\mathrm{i-1}}) & \mbox{if}
& -\pi < \phi_{\mathrm{i}}-\phi_{\mathrm{i-1}} \leqslant \pi \\
\phi^{\mathrm{(c)}}_{\mathrm{i-1}} +
(\phi_{\mathrm{i}}-\phi_{\mathrm{i-1}}) - 2 \pi & \mbox{if}
& \phi_{\mathrm{i}}-\phi_{\mathrm{i-1}} > \pi \\
\phi^{\mathrm{(c)}}_{\mathrm{i-1}} +
(\phi_{\mathrm{i}}-\phi_{\mathrm{i-1}}) + 2\pi & \mbox{if}
& \phi_{\mathrm{i}}-\phi_{\mathrm{i-1}} \leqslant -\pi
\end{array}
\right. .
\end{equation}
This has the property that there are qualitative changes to the
behaviour if aliasing occurs.
--8<---------------cut here---------------end--------------->8---
which looks correct. Can you assemble an example starting with emacs -Q
exhibiting the issue?
Best, Arash
This bug report was last modified 1 year and 255 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.