\llbracket and \rrbracket problem

27 views
Skip to first unread message

Viktor S.

unread,
Sep 13, 2025, 3:21:42 PM (6 days ago) Sep 13
to MathJax Users
Hi,
I used this information to try and make the brackets available for use, but this has completely changed the way symbols render: previously, I was able to see all symbols in math mode when using high contrast themes on windows, but now some of the symbols merge into the background (become the same colorwith the background), so I have to switch back to the standard theme to make them visible. The vertical spacing also seems to have changed, but then I realized that these changes are likey due to the font.

You can see the comparison of unselected vs. selected text (it will give you a hint):
screen.png

I guess I'll have to postpone the use of double brackets for now, unless I'm willing to deal with these artifacts.

Thanks.

Viktor S.

unread,
Sep 13, 2025, 9:01:20 PM (5 days ago) Sep 13
to MathJax Users
It turns out, this happens only when the remote tex-chtml.js is loaded, it works fine when tex-chtml.js is local (v4). Another problem is that \eqqcolon command is no longer recognized and is rendered literally (as text). The previous version of MathJax recognized the command (I have mathtools package loaded).

Viktor S.

unread,
Sep 13, 2025, 10:25:54 PM (5 days ago) Sep 13
to MathJax Users

OK, this code (which allows for double bracket use), suggested by Davide, renders \coloneqq, \eqqcolon, \coloneq, and \eqcolon commands unusable (they show up as text):
  window.MathJax=
    { startup:
        { ready()
            { MathJax.startup.defaultReady();
              const{Token}=MathJax._.input.tex.Token;
              const{MapHandler}=MathJax._.input.tex.MapHandler;
              const delimiter=MapHandler.getMap('delimiter');
              delimiter.add('\\llbracket',new Token('\\llbracket','\u27E6'));
              delimiter.add('\\rrbracket',new Token('\\rrbracket','\u27E7'));
            }
        }
    }

How can we fix this?

Davide Cervone

unread,
Sep 14, 2025, 8:06:25 AM (5 days ago) Sep 14
to mathja...@googlegroups.com
I am not able to reproduce the issues that you describe.  The configuration for the brackets available works for me, and does not interfere with the \eqqcolon or other macros, nor do I experience any selection issues.  But you haven't said what version of Windows you are using, or what browser and version, so I am y not be testing the same setup that you are.

Have you checked the developer tools console to see if there are any error messages from your page?  I'm wondering if there isn't an issue with your configuration so that it is not actually being processed.  For example, the configuration you give below doesn't include loading mathtools, so that would account for the macros not being defined.  And if you have merged this configuration into a larger one that does load mathtools, perhaps you left out a comma or something that has made the configuration invalid so that it doesn't run.

As for the selection issue, there is CSS using clip-path that should be limiting the size of the select background that doesn't seem to be working for you.  The CS for that does rely on using a relatively recent browser (like not more than 2 or 3 years old), so that may be the problem if you are using an older browser.  Otherwise, there may be CSS in your page that is overriding MathJax's CSS.  I can't tell from the limited information you have provided.

Davide


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/f3b725e3-4d70-41c3-866e-9b28d9ce365dn%40googlegroups.com.

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Viktor S.

unread,
Sep 16, 2025, 7:15:55 AM (3 days ago) Sep 16
to MathJax Users
Hello, Davide,
My apologies for not providing more information.

OS: Windows 10
Browser: Firefox 142.0.1 (32-bit)
window.MathJax.version: 4.0.0
TypeError: NetworkError when attempting to fetch resource. speech-worker.js:1:411404
TypeError: can't convert undefined to object:
 "...for(let r,o=0;r=Object.keys(t)[o];o++){...}..."

I have written the following configuration to be loaded from a separate script file ("myconfig.js"):
  MathJax=
    { tex:
        { inlineMath:
            [ ['$','$'],
              ['\\(','\\)']
            ],
          packages:
            { '[+]':[ 'centernot',
                      'mathtools'
                    ]
            }
        },
      loader:
        { load: [ '[tex]/centernot',
                  '[tex]/mathtools'
                ]
        }
    };
This is how HTML looks:
<script src="file:\\[MY_PATH]\myconfig.js"></script>
<script src="file:\\[MY_PATH]\MathJax-master\tex-chtml.js" id="MathJax-script" async></script>
<script>

  window.MathJax=
    { startup:
        { ready()
            { MathJax.startup.defaultReady();
              const{Token}=MathJax._.input.tex.Token;
              const{MapHandler}=MathJax._.input.tex.MapHandler;
              const delimiter=MapHandler.getMap('delimiter');
              delimiter.add('\\llbracket',new Token('\\llbracket','\u27E6'));
              delimiter.add('\\rrbracket',new Token('\\rrbracket','\u27E7'));
            }
        }
    };
</script>
<br><br>\(\left\llbracket\dfrac{a}{b}\coloneq\dfrac{c}{d}\right\rrbracket\)
<br><br>\(a\coloneq{}b\)

The output:
screen2.png

Viktor S.

unread,
Sep 16, 2025, 7:15:55 AM (3 days ago) Sep 16
to MathJax Users
Something (or someone) is deleting my followup messages. Sorry, Davide.
Take a look here instead.
On Sunday, September 14, 2025 at 8:06:25 AM UTC-4 Davide Cervone wrote:

Viktor S.

unread,
Sep 16, 2025, 7:15:55 AM (3 days ago) Sep 16
to MathJax Users
  window.MathJax=
    { startup:
        { ready()
            { MathJax.startup.defaultReady();
              const{Token}=MathJax._.input.tex.Token;
              const{MapHandler}=MathJax._.input.tex.MapHandler;
              const delimiter=MapHandler.getMap('delimiter');
              delimiter.add('\\llbracket',new Token('\\llbracket','\u27E6'));
              delimiter.add('\\rrbracket',new Token('\\rrbracket','\u27E7'));
            }
        }
    };
</script>
<br><br>\(\left\llbracket\dfrac{a}{b}\coloneq\dfrac{c}{d}\right\rrbracket\)
<br><br>\(a\coloneq{}b\)

The output:
output.png

P.S. Not sure if this will go through. My previous attempts got auto-removed by the Google's spam system (not sure what it didn't like).
On Sunday, September 14, 2025 at 8:06:25 AM UTC-4 Davide Cervone wrote:

Viktor S.

unread,
Sep 16, 2025, 7:15:56 AM (3 days ago) Sep 16
to MathJax Users
Hello, Davide,

My apologies for not providing more information.

OS: Windows 10
Browser: Firefox 142.0.1 (32-bit)
window.MathJax.version: 4.0.0
TypeError: NetworkError when attempting to fetch resource. speech-worker.js:1:411404
TypeError: can't convert undefined to object:
 "...for(let r,o=0;r=Object.keys(t)[o];o++){...}..."

I always use the following configuration to be loaded from a separate script file ("myconfig.js"):

  MathJax=
    { tex:
        { inlineMath:
            [ ['$','$'],
              ['\\(','\\)']
            ],
          packages:
            { '[+]':[ 'centernot',
                      'mathtools'
                    ]
            }
        },
      loader:
        { load: [ '[tex]/centernot',
                  '[tex]/mathtools'
                ]
        }
    };

And this is how HTML looks:

<script src="file:\\[MY_PATH]\myconfig.js"></script>
<script src="file:\\[MY_PATH]\MathJax-master\tex-chtml.js" id="MathJax-script" async></script>
<script>
  window.MathJax=
    { startup:
        { ready()
            { MathJax.startup.defaultReady();
              const{Token}=MathJax._.input.tex.Token;
              const{MapHandler}=MathJax._.input.tex.MapHandler;
              const delimiter=MapHandler.getMap('delimiter');
              delimiter.add('\\llbracket',new Token('\\llbracket','\u27E6'));
              delimiter.add('\\rrbracket',new Token('\\rrbracket','\u27E7'));
            }
        }
    };
</script>

\(\left\llbracket\dfrac{a}{b}\coloneq\dfrac{c}{d}\right\rrbracket\)

And the output (first comes the output when the "startup" configuration option [you have posted on TeX Exchange] is not commented out [no \coloneq, but \llbracket and \rrbracket work], then comes the output when it is commented out [no \llbracket and \rrbracket, but \coloneq works, although \coloneq not shown in the math expression used for testing, since nothing renders due to unrecognized delimiter]):
screen.png

On Sunday, September 14, 2025 at 8:06:25 AM UTC-4 Davide Cervone wrote:

Davide Cervone

unread,
Sep 16, 2025, 7:24:07 AM (3 days ago) Sep 16
to mathja...@googlegroups.com
Google's spam filter has gotten much more aggressive recently, and it seems that it is trapping mostly replies but not original messages.  I've let your replies through, and (I hope) white0listed you, so you should be able to get through in the future.

Davide

Davide Cervone

unread,
Sep 16, 2025, 7:47:58 AM (3 days ago) Sep 16
to mathja...@googlegroups.com
Because your "myconfig.js" file sets the MathJax variable and then the in-line script that follows that sets window.MathJax again, the second script wipes out the first definition of MathJax, so you end up not loading the mathtools package, that defines the \coloneq macro.  That is why you are getting the macro name instead of its symbol.  It should be showing in red, but the high-contrast mode is preventing the coloring from working.  In my experience, the Windows 10 high-contrast mode is badly broken in many ways, and is not likely to give you good results in many cases.  It certainly makes MathJax output look much worse, and it probably aggravates the selection problem you are seeing.

You need to merge the second script into your first one so that all the MathJax configuration is in one file.  If you want to keep it as two separate pieces, the in-line script should use

window.MathJax.startup = {
  ready() {
    ...
  }
};

instead, in order to add it to the existing MathJax object that than replacing it.

Note that Windows 10 was released in 2015, so is now 10 years old, and is entire end-of-life status in October, so Microsoft will no longer support it or make any updates.  I suspect that Windows 10 itself may be the reason you are getting the bad selection behavior.  MathJax uses some modern CSS (clip-path using xywh() specifier) and I think Windows 10 doesn't support that, even with modern browsers.  You could try adding

mjx-mo > mjx-c, mjx-mi > mjx-c, mjx-mn > mjx-c, mjx-ms > mjx-c, mjx-mtext > mjx-c {
  clip-path: padding-box polygon(-1em -2px, calc(100% + 1em) -2px, calc(100% + 1em) calc(100% + 2px), -1em calc(100% + 2px)) ! important;
}

to your page's CSS and see if that helps.  If it does, there is some more CSS that should be changed as well.

Davide


Reply all
Reply to author
Forward
0 new messages