GNU bug report logs -
#78006
Improving `TeX-electric-math' behavior
Previous Next
Reported by: Arash Esbati <arash <at> gnu.org>
Date: Wed, 23 Apr 2025 07:27:01 UTC
Severity: normal
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi Arash,
Thanks, sounds good. I'll plan to send these commands as a separate bug
(and have no further comments on the current bug). Some responses:
>> ;;;###autoload
>> (defun czm-tex-edit-make-equation-inline ()
>> "Convert LaTeX equation environment at point to inlined math.
>> Format LaTeX environment at point by surrounding the math
>> environment with dollar signs, removing any leading or trailing
>> text."
>
> I think this will break if the equation environment has a \label{eq:x}?
It will indeed break (i.e., put the \label{...} inside the $...$) if the
\label{...} does not occur on the same line as \begin{...}. Perhaps we
could kill any labels first.
A related issue is ampersands alignment characters (e.g., in align
environments) that should not exist when we convert to inline, but
ampersands occur in other ways (e.g., matrices), so it seems tricky to
get this right. Personally, I use the command only when the displayed
expression is simple enough, which restricts the possible edge cases.
Thanks, best,
Paul
This bug report was last modified 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.