use mathjax3 in andriod5 show error "getExplicit of null"
DO NOT simply erase the form and type a free-form response.
Replace the text below with the details of the issue you are facing.Issue Summary
A summary of the issue and the browser/OS environment in which it occurs. If suitable, include the steps required to reproduce the bug.
Steps to Reproduce:
- This is the first step
- This is the second step
- Further steps, etc.
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
Technical details:
- MathJax Version: 3.2
- Client OS: Mac OS X 11.5.2
I am using the following MathJax configuration:
window.MathJax = {
chtml: {
matchFontHeight: false,
mtextInheritFont: false
},
options: {
renderActions: {
addMenu: [],
checkLoading: []
},
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'a'],
includeHtmlTags: {
br: '\n',
wbr: '',
'#comment': ''
},
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
tex: {
inlineMath: [['<latex>', '</latex>'], ['$', '$'], ['_mathjax_','_mathjax_'], ['$','$'], ['$$','$$'], ['\\(','\\)']],
displayMath: [],
macros: {
ykparallelogram: '\\unicode{x25B1}',
ykparallel: '//'
},
autoload: {
color: [],
colorV2: ['color']
},
packages: {
'[+]': ['trap-undefined'],
'[-]': ['noundefined']
}
},
loader: {
load: ['[tex]/noerrors']
},
startup: {
ready: function () {
var tex = null;
var Configuration = MathJax._.input.tex.Configuration.Configuration;
var TexError = MathJax._.input.tex.TexError.default;
Configuration.create('trap-undefined', {
fallback: {
macro: function (parser, cs) {
tex.inputData.codecogs = true;
},
environment: function (parser, env) {
tex.inputData.codecogs = true;
}
}
});
var toDOM = function (math, node, html) {
this.setDocument(html);
if (math.inputData.codecogs) {
var adaptor = html.adaptor;
if (math.display) adaptor.setAttribute(node, 'display', true);
var imageNode = adaptor.node('img', {
src: 'https://gallery.fbcontent.cn/latex?decode=false&fontSize=34&latex=' + encodeURIComponent(math.math.trim() + '\\quad'),
alt: tex.math.trim()
})
imageNode.onload = function () {
imageNode.style.height = imageNode.naturalHeight / 2 + 'px'
imageNode.style.width = imageNode.naturalWidth / 2 + 'px'
}
html.adaptor.append(node, imageNode);
math.display = null;
} else {
this._toDOM(math, node, html);
}
};
var getOutputJax = MathJax.startup.getOutputJax;
MathJax.startup.getOutputJax = function () {
var output = getOutputJax();
output._toDOM = output.toDOM;
output.toDOM = toDOM;
return output;
}
MathJax.startup.defaultReady();
MathJax.startup.input[0].preFilters.add(function (filter) {
var math = filter.math
tex = math
});
MathJax.startup.output._toDOM = MathJax.startup.output.toDOM;
MathJax.startup.output.toDOM = toDOM;
}
}
}
and loading MathJax via
<script src="https://solar.fbcontent.cn/h5/solar-web-mathjax3/es5/tex-chtml.js"></script>
Supporting information:
- Please supply a link to a (live) minimal example page, when possible.
- If your issue is with the display of the mathematics produced by MathJax, include a screen snapshot that illustrates the problem, when possible.
- Check your browser console window for any error messages, and include them here.
- Include the MathJax configuration you are using, and the script tag that loads MathJax itself.