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
  • #1876
Closed
Open
Issue created Nov 29, 2017 by Administrator@rootContributor

DeclareMathOperator defined within begingroup-endgroup leaks outside

Created by: matroid-de

Dear all,

\begingroup-\endgroup does not work as I expected according to the documentation.

This is a minimal example:

<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
...
<body>
\[
  \require{begingroup}\begingroup
  \DeclareMathOperator{\lcm}{LCM}
\]
As declared:     \(\lcm\)
\(\endgroup\)
still declared: \(\lcm\)

Expected result for the second \lcm was \lcm, as \lcm must not be registered outside begingroup-endgroup. Instead I'm getting LCM twice.

Remark: \newcommand and \let are working as I expected. The possible issue is with \DeclareMathOperator only.

I'd appreciate If someone would check if this is an issue or if I had understood something wrong in the documentation.

Thank you in advance Martin Wohlgemuth

Assignee
Assign to
Time tracking