author
松鼠
date
2022-11-10
editdate
2022-11-28
formatted-for
salenzo.readthedocs.io

实验性的数学公式支持 / 在网页上渲染数学公式的另类解决方案

为了免去MathJax丑陋又缓慢的“正在渲染数学”提示,切实提升页面加载速度,同时调整公式的字体以免MathJax默认的TeX字体与页面的其余部分格格不入,仅使用MathJax将LaTeX公式转换到MathML。虽然MathML标准已经有好些年头了,但是浏览器支持仍旧一塌糊涂,不少屑东西明确表示拒绝支持。我想,借助现今更为先进的CSS排版功能,能否不用JavaScript测量文本尺寸就渲染出漂亮——至少是不难看——的数学公式呢?

{12(nk),2×(1)}

这可是纯CSS实现的可伸缩大括号哦!这些字符是各种正文字体通用的,因为用CSS也画不出更具特色的符号了。


MathJax的文档写得真是烂爆了……

支持下列标签:

绝对不会支持下列玩意:

1+1=214, is true. \undef=1x.

This mathematical formula with a big summation and the number pi n=1+1n2=π26 is easy to prove.

This mathematical formula with a big summation and the number pi n=1+1n2=π26 is easy to prove.

\mathbf{Ab}^\mathsf{T}


View source