Open guoyutao opened 2 months ago
and enableMenu: false, does not work. options: { enableMenu: false, },
the context menu will still appear.
Concerning in-line breaking in Safari: this is a bug with Safari, but I have created a pull request that works around it.
I note that you are using the alpha.1 release. That is pretty old, now, and it had a number of issues with the line breaking. You might consider using the beta.4 or beta.6 release.
In the meantime, you can use this configuration:
MathJax = {
tex: {inlineMath: [['$', '$']]},
startup: {
ready() {
const {ChtmlMath} = MathJax._.output.chtml.Wrappers.math;
delete ChtmlMath.styles['mjx-container[jax="CHTML"] mjx-break::after'];
ChtmlMath.styles['mjx-container[jax="CHTML"] mjx-break'] = {
'white-space': 'normal',
'font-family': 'MJX-BRK'
};
MathJax.startup.defaultReady();
const adaptor = MathJax.startup.adaptor;
MathJax.startup.document.outputJax.postFilters.add(({data}) => {
for (const brk of adaptor.tags(data, 'mjx-break')) {
brk.innerHTML = ' ';
}
});
}
}
};
to fix the situation until the next release.
As for your second problem, please use a separate issue tracker when there is more than one issue. In this case, I think you are misunderstanding what it happening. The image you include doesn't show the MathJax contextual menu, which is what enableMenu
controls, but rather shows the assistive expression explorer. That is not affected by enableMenu
.
The explorer is enabled by having speech or braille output enabled, which are specified in the options.menuOptions.settings.speech
and options.menuOptions.settings.braille
configuration options. If you want your site to be accessible to those with assistive needs, like screen readers, you will not disable the menu, as that is where the accessibility features are controlled.
Thank you very much, your configuration work.
Issue Summary
In line breaking does not work on safari in macOS and iOS.But it work on Chrome in macOS.
Technical details:
I am using the following MathJax configuration:
and loading MathJax via
Supporting information:
MacOS safari:
MacOS Chrome: