Vue 中 MathJax 的使用与渲染的监听 (上)

本文介绍了在Vue项目中使用MathJax渲染数学公式的方法,包括MathJax的基本特性、按需加载策略、在Vue组件中的应用以及如何处理特殊需求,如监听渲染完成以支持打印功能。
摘要由CSDN通过智能技术生成

在这里插入图片描述

本文作者:傅云贵(网易有道技术团队)

引言

最近,在桌面 web 前端项目中使用了 MathJax 渲染数学公式,遇到一些坑,如今总结之。

MathJax 是什么

在 MathJax 官网 能看到以下的介绍:

A JavaScript display engine for mathematics that works in all browsers.

No more setup for readers. It just works.

在 MathJax 的官方文档 What is MathJax? 中有以下文字:

MathJax is an open-source JavaScript display engine for LaTeX and MathML that works in all modern browsers. …

MathJax uses web-based fonts (in those browsers that support it) to produce high-quality typesetting that scales and prints at full resolution (unlike mathematics included as images)…

MathJax is modular, so it loads components only when necessary, and can be extended to include new capabilities as needed. MathJax is highly configurable, allowing authors to customize it for the special requirements of their web sites. Finally, MathJax has a rich application programming interface (API) that can be used to make the mathematics on your web pages interactive and dyna

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值