Skip to content

Commit

Permalink
mathjax settings
Browse files Browse the repository at this point in the history
  • Loading branch information
AakashGfude committed May 5, 2021
1 parent 7e27e72 commit 1ca3933
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 25 deletions.
31 changes: 31 additions & 0 deletions quantecon_book_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,37 @@
touch: false,
});
feather.replace();
window.MathJax = {
startup: {
ready: () => {
console.log('MathJax is loaded, but not yet initialized');
MathJax.startup.defaultReady();
console.log('MathJax is initialized, and the initial typeset is queued');
}
},
tex: {
inlineMath: [
['$', '$'],
['\\(', '\\)'],
],
processEscapes: true
},
chtml: {
scale: 0.92,
displayAlign: "center"
},
svg: {
scale: 0.92,
displayAlign: "center",
},
options: {
menuOptions: {
settings: {
renderer: 'SVG'
}
}
},
};
</script>
{%- endblock %}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion quantecon_book_theme/theme.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Note: this should only be changed in src/jinja/theme.conf.j2
[theme]
inherit = pydata_sphinx_theme
stylesheet = quantecon-book-theme.885d9ef116b3d4de1ea03f6d505b5c33.css
stylesheet = quantecon-book-theme.9428881bef30503ba3c98a8c152d748d.css

[options]
single_page = False
Expand Down
20 changes: 0 additions & 20 deletions src/js/quantecon-book-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,4 @@ $(document).ready(() => {
contentTables[i].parentNode.insertBefore(wrapper, contentTables[i]);
wrapper.appendChild(contentTables[i]);
}
window.MathJax = {
tex: {
inlineMath: [
['$', '$'],
['\\(', '\\)'],
],
processEscapes: true
},
chtml: {
scale: 0.92
},
options: {
menuOptions: {
settings: {
renderer: 'SVG'
}
}
},
displayAlign: "center"
};
})
1 change: 0 additions & 1 deletion src/scss/quantecon-book-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,6 @@ tt {
.MathJax {
color: #333;
margin: 2rem 0;
display: inline !important; // Fix to remove padding on focus
}

a .MathJax {
Expand Down

1 comment on commit 1ca3933

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.