Skip to content

Commit 16410f9

Browse files
committed
Revert "no longer need to tweak mathjax config in texToSVG"
This reverts commit 721d634.
1 parent 40a9a55 commit 16410f9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/lib/svg_text_utils.js

+12
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,27 @@ function cleanEscapesForTex(s) {
153153

154154
function texToSVG(_texString, _config, _callback) {
155155
var originalRenderer,
156+
originalConfig,
156157
originalProcessSectionDelay,
157158
tmpDiv;
158159

159160
MathJax.Hub.Queue(
160161
function() {
162+
originalConfig = Lib.extendDeepAll({}, MathJax.Hub.config);
163+
161164
originalProcessSectionDelay = MathJax.Hub.processSectionDelay;
162165
if(MathJax.Hub.processSectionDelay !== undefined) {
163166
// MathJax 2.5+
164167
MathJax.Hub.processSectionDelay = 0;
165168
}
169+
170+
return MathJax.Hub.Config({
171+
messageStyle: 'none',
172+
tex2jax: {
173+
inlineMath: [['$', '$'], ['\\(', '\\)']]
174+
},
175+
displayAlign: 'left',
176+
});
166177
},
167178
function() {
168179
// Get original renderer
@@ -202,6 +213,7 @@ function texToSVG(_texString, _config, _callback) {
202213
if(originalProcessSectionDelay !== undefined) {
203214
MathJax.Hub.processSectionDelay = originalProcessSectionDelay;
204215
}
216+
return MathJax.Hub.Config(originalConfig);
205217
});
206218
}
207219

0 commit comments

Comments
 (0)