window.MathJax = {
chtml: {
mtextInheritFont: true, ← 親要素で設定されたフォントが数式に継承される
matchFontHeight: false, ← フォントの高さの自動調整を無効に設定
scale: 0.85 ← 追加(フォントサイズを85%に)
},
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']], ← 数式をインライン(行内)表示するための設定
processEscapes: true, ← 数式外で $(ドルマーク)が使えるようにする設定
tags: 'ams' ← 式番号を自動で振る
},
svg: {
fontCache: 'global', ← フォントデータをブラウザキャッシュに格納する設定
scale: 0.85 ← 追加(フォントサイズを85%に)
}
};
(function () {
const script = document.createElement('script');
if (navigator.userAgent.includes("Chrome") || navigator.userAgent.includes("Firefox"))
script.src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js";
else
script.src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js";
script.async = true;
document.head.appendChild(script);
})();