From 99614aede3914398f5aa8bf7cd1de3bc7fb8bdc8 Mon Sep 17 00:00:00 2001 From: Seonhyo Choi Date: Wed, 8 Jul 2026 03:45:08 +0900 Subject: [PATCH] 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. --- assets/js/data/mathjax.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/js/data/mathjax.js b/assets/js/data/mathjax.js index ca3d0de52..8a546e63a 100644 --- a/assets/js/data/mathjax.js +++ b/assets/js/data/mathjax.js @@ -21,5 +21,9 @@ MathJax = { ], {%- comment -%} equation numbering {%- endcomment -%} tags: 'ams' + }, + output: { + {%- comment -%} scroll long display equations instead of overflowing the page {%- endcomment -%} + displayOverflow: 'scroll' } };