GNU bug report logs - #57626
13.1.4; cases* environment doesn't let me use $

Previous Next

Package: auctex;

Reported by: Wierdl Máté <wierdlmate <at> gmail.com>

Date: Tue, 6 Sep 2022 14:55:03 UTC

Severity: normal

Found in version 13.1.4

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Arash Esbati <arash <at> gnu.org>
Cc: 57626 <at> debbugs.gnu.org, Wierdl Máté <wierdlmate <at> gmail.com>
Subject: bug#57626: 13.1.4; cases* environment doesn't let me use $
Date: Thu, 08 Sep 2022 02:13:41 +0900
Hi Wierdl and Arash,

> Wierdl Máté <wierdlmate <at> gmail.com> writes:
>> \begin{equation}
>> \label{eq:240}
>> Tx=
>> \begin{dcases*}
>> 1& if 
>> \end{dcases*}
>> \end{equation}
>> 
>> and after "if" a I try to enter a formula, but auctex says in the
>> minibuffer
>> 
>> "Math mode started with ‘equation’ cannot be closed with dollar"
>> 
>> I should be able to enter a $ in text mode.

Ah, it's the same as https://tex.stackexchange.com/questions/578900/auctex-math-mode-started-with-cannot-be-closed-with-dollar-in-cases
...
As written there, temporal workaround is to type C-u $ or C-q $ to
insert "$" in such a case.

>>>>> Arash Esbati <arash <at> gnu.org> writes:
> I think this a corner case where half of a environment is math and the
> other half text.  AUCTeX thinks that the entire environment is math and
> hence throws an error.  I don't have a strong opinion about this, we can
> add some entries like this to `texmathp-tex-commands-default':

>     ("cases*"   env-off)
>     ("dcases*"  env-off)
>     ("rcases*"  env-off) 
>     ("drcases*" env-off)

> What do others think?

In my opinion, `TeX-insert-dollar' is too patriarchal in this case. The
intention of `texmathp' is apparently to be "practical enough", not
"precise". It sometimes by design gives false positives and false
negatives, which we should anticipate.

How about to allow insertion of "$" (or anything according to
`TeX-electric-math') when `last-command' is `TeX-insert-dollar' in a
case like this issue? I suppose that most users would type "$" again
before seeing "Math mode started with `...' cannot be closed with
dollar" when "$" is refused unexpectedly.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine




This bug report was last modified 2 years and 203 days ago.

Previous Next


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