Skip to content

Commit

Permalink
Fix for mathjax overflow problem (theme-next#645) (theme-next#669)
Browse files Browse the repository at this point in the history
also prevent unexpected scroll bar (theme-next#658)
  • Loading branch information
zq1997 authored and stevenjoezhang committed Mar 12, 2019
1 parent b270f6a commit b3a84b1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions layout/_third-party/math/mathjax.swig
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,19 @@
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for (i = 0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
document.getElementById(all[i].inputID + '-Frame').parentNode.className += ' has-jax';
}
});
</script>
<script src="{{ theme.math.mathjax.cdn }}"></script>

<style>
.MathJax_Display {
overflow-x: scroll;
.has-jax {
overflow-x: auto;
overflow-y: hidden;
}

li {
list-style-position: inside !important;
}
</style>

0 comments on commit b3a84b1

Please sign in to comment.