\newcommand redefines TeX commands (such as \begin, \mathbf, ...)
Created by: SpectralFlame
Issue Summary
When defining a new command (using \newcommand
or \def
) on a line before a command such as \begin{...}
; in the process of typing that, it will redefine \begin
to whatever is in the braces, essentially breaking any environments defined with \begin
.
This issue is not specific to \begin
, though.
Steps to Reproduce:
- Starting point
$$
\begin{aligned}
a = 3
\end{aligned}
$$
- Type
\newcommand
on the first line to get
$$
\newcommand
\begin{aligned}
a = 3
\end{aligned}
$$
At this point, \begin
is redefined to aligned
, even though \begin
is already a defined command. Also, the purpose was to define another command entirely, but in the process of writing it, something else got redefined too.
Ideally, one would be able to define a new command at the top without having to worry that stuff could break by accident while typing out the command.
Technical details:
- MathJax Version: 3.2
- Client OS: Linux 5.19.9-arch1-1
- Browser: Vivaldi 5.4.2753.51 (Stable channel) stable (64-bit)
I am using the following MathJax configuration: Live demo on https://www.mathjax.org/#demo