KaTeX 字体大小

KaTeX font size

KaTeX 的 function support 页面指出,用于字体尺寸的 KaTeX 单位的尺寸是根据周围的 HTML 文本计算的。特别是,它指出

G = 1.21 by default, because KaTeX font-size is normally 1.21 × the surrounding font size. This value can be over-ridden by the CSS of an HTML page. For example, on this page, G = 1.0.

现在的问题是,我应该在哪里修改G的值?

KaTex wiki 中所述,可以在 CSS 中重新设置,例如

.katex { font-size: 1em !important; } 

编辑

文档不再托管在项目的 wiki 上。您可以在新的官方文档页面 here.

中看到相同的信息

现在记录在:https://katex.org/docs/font.html

By default, KaTeX math is rendered in a 1.21× larger font than the surrounding context, which makes super- and subscripts easier to read. You can control this using CSS, for example, to set to 1.1×:

.katex { font-size: 1.1em; }

文档来源:https://github.com/KaTeX/KaTeX/blob/v0.10.2/docs/font.md