Skip to content

Commit 225446f

Browse files
committed
%display latex is the default
1 parent da82502 commit 225446f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/doc/common/static/jupyter-sphinx-furo.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function changeTheme(editor, theme) {
88
}
99
}
1010

11-
// Uses the theme data of the document.body element set by setTheme function
11+
// Use the theme data of the document.body element set by setTheme function
1212
// defined in https://github.com/pradyunsg/furo/blob/main/src/furo/assets/scripts/furo.js
1313
const body = document.body;
1414
const observer1 = new MutationObserver((mutationsList) => {
@@ -32,3 +32,14 @@ const callback = function(mutationsList, observer) {
3232
}}}}};
3333
const observer2 = new MutationObserver(callback);
3434
observer2.observe(document.getElementsByClassName("content")[0], { childList: true, subtree: true });
35+
36+
37+
// Run custom code once the kernel is ready
38+
// https://thebe.readthedocs.io/en/stable/events.html
39+
thebelab.on("status", function (evt, data) {
40+
if (data.status === 'ready') {
41+
const kernel = data.kernel;
42+
kernel.requestExecute({code: "%display latex"});
43+
}
44+
});
45+

0 commit comments

Comments
 (0)