Skip to content

Commit

Permalink
no longer need to tweak mathjax config in texToSVG
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Feb 18, 2021
1 parent d49f5df commit 721d634
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/lib/svg_text_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,27 +153,16 @@ function cleanEscapesForTex(s) {

function texToSVG(_texString, _config, _callback) {
var originalRenderer,
originalConfig,
originalProcessSectionDelay,
tmpDiv;

MathJax.Hub.Queue(
function() {
originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);

originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
if(MathJax.Hub.processSectionDelay !== undefined) {
// MathJax 2.5+
MathJax.Hub.processSectionDelay = 0;
}

return MathJax.Hub.Config({
messageStyle: 'none',
tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
displayAlign: 'left',
});
},
function() {
// Get original renderer
Expand Down Expand Up @@ -213,7 +202,6 @@ function texToSVG(_texString, _config, _callback) {
if(originalProcessSectionDelay !== undefined) {
MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
}
return MathJax.Hub.Config(originalConfig);
});
}

Expand Down

0 comments on commit 721d634

Please sign in to comment.