Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #2934
Closed
Open
Issue created Sep 23, 2022 by Administrator@rootContributor

\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:

  1. Starting point
$$
\begin{aligned}
a = 3
\end{aligned}
$$
  1. 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

Assignee
Assign to
Time tracking