1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2026-08-06 13:57:42 +00:00
Files
jekyll-theme-chirpy/assets/js/data/mathjax.js
T
Seonhyo Choi 99614aede3 fix(math): restore formula overflow scroll for MathJax 4 (#2770)
Since the MathJax 4 upgrade (97a537e), the `mjx-container` overflow
rules were dropped, so long display equations extend past the viewport
and cause page-level horizontal scrolling on mobile (the fix from #545
for #543 was lost). MathJax 4 defaults to `displayOverflow: 'overflow'`;
set it to 'scroll' so long equations scroll within their own container.
2026-07-08 02:45:08 +08:00

30 lines
785 B
JavaScript

---
layout: compress
# WARNING: Don't use '//' to comment out code, use '{% comment %}' and '{% endcomment %}' instead.
---
{%- comment -%}
See: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options>
{%- endcomment -%}
MathJax = {
tex: {
{%- comment -%} start/end delimiter pairs for in-line math {%- endcomment -%}
inlineMath: [
['$', '$'],
['\\(', '\\)']
],
{%- comment -%} start/end delimiter pairs for display math {%- endcomment -%}
displayMath: [
['$$', '$$'],
['\\[', '\\]']
],
{%- comment -%} equation numbering {%- endcomment -%}
tags: 'ams'
},
output: {
{%- comment -%} scroll long display equations instead of overflowing the page {%- endcomment -%}
displayOverflow: 'scroll'
}
};