fix: display of long equations is cut off (#287)

This commit is contained in:
Hasenpfote
2025-01-19 17:11:51 +09:00
committed by GitHub
parent 18cc3e0d4f
commit 8287e42e6e
2 changed files with 19 additions and 1 deletions

View File

@@ -162,5 +162,14 @@ math should get its own line and be put in in double-dollarsigns:
$$I = \int \rho R^{2} dV$$
$$
\begin{equation*}
\pi
=3.1415926535
\;8979323846\;2643383279\;5028841971\;6939937510\;5820974944
\;5923078164\;0628620899\;8628034825\;3421170679\;\ldots
\end{equation*}
$$
And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc.

View File

@@ -305,7 +305,8 @@ function initCustomScrollbar() {
autoHideSuspend: false,
},
});
document.querySelectorAll('pre').forEach((ele) => {
const preElements = document.querySelectorAll('pre');
preElements.forEach((ele) => {
OverlayScrollbars(ele, {
scrollbars: {
theme: 'scrollbar-base scrollbar-dark px-2',
@@ -315,6 +316,14 @@ function initCustomScrollbar() {
}
});
});
const katexElements = document.querySelectorAll('.katex-display') as NodeListOf<HTMLElement>;
katexElements.forEach((ele) => {
OverlayScrollbars(ele, {
scrollbars: {
theme: 'scrollbar-base scrollbar-auto py-1',
}
});
});
}
function showBanner() {