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