-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Plotly cannot be loaded if Mathjax v3 is already loaded #4563
Copy link
Copy link
Closed
Labels
bugsomething brokensomething broken
Description
Since MathJax v3, Mathjax.Hub does not exist anymore. This makes impossible to load PlotlyJS if Mathjax v3 has already been loaded. I get the following error:
TypeError: MathJax.Hub is undefined
I believe the error comes from these lines plotly.js:
module.exports = function() {
if(typeof MathJax !== 'undefined') {
var globalConfig = (window.PlotlyConfig || {}).MathJaxConfig !== 'local';
if(globalConfig) {
MathJax.Hub.Config({
messageStyle: 'none',
skipStartupTypeset: true,
displayAlign: 'left',
tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
});
MathJax.Hub.Configured();
}
}
};A check on MathJax version should probably be made here to use MathJax.Hub or not?
Here is a short example where plotly failed to be loaded: https://codepen.io/bthierry/pen/PoqwXzm
Many thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugsomething brokensomething broken