Skip to content

Commit 76006f9

Browse files
committed
Typeset math after execution
1 parent e353625 commit 76006f9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

web/ide_injections.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,21 @@ function ide_action(editor_elt, config_64) {
298298
// Process post src.
299299
var postsrc = config.postsrc || '';
300300
EMULISP_CORE.eval(postsrc);
301-
// Rest of operations.
301+
302+
// Rest of operations:
303+
// Reset *LastStdOut
302304
EMULISP_CORE.eval('(setq *LastStdOut "?")');
305+
// src -> localStorage
303306
if (config.localStorage && typeof(Storage) !== "undefined") {
304307
var key = 'microalg_src_' + elt_id;
305308
localStorage[key] = src;
306309
}
310+
// Typeset the target if MathJax is loaded
311+
if (typeof MathJax !== "undefined") {
312+
MathJax.Hub.Queue(["Typeset",
313+
MathJax.Hub,
314+
document.getElementById(display_target_id)]);
315+
}
307316
}
308317

309318
/* Inject an editor + display in the relevant element.

0 commit comments

Comments
 (0)