当前位置:网站首页>mathML转latex
mathML转latex
2022-07-02 11:21:00 【徐同保】

https://www.npmjs.com/package/mathml2latex
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="./node_modules//mathml2latex/dist/mathml2latex.js"></script>
</head>
<body>
<script>
// const mathmlHtml =
// '<math display="block"><mfrac><mi>a</mi><mi>b</mi></mfrac></math>'
const mathmlHtml = ` <div>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup><mi>a</mi><mn>2</mn></msup>
<mo>+</mo>
<msup><mi>b</mi><mn>2</mn></msup>
<mo>=</mo>
<msup><mi>c</mi><mn>2</mn></msup>
</mrow>
</math>
</div>`
const latex = MathML2LaTeX.convert(mathmlHtml)
console.log(latex)
</script>
</body>
</html>

边栏推荐
- Stm32-dac Experiment & high frequency DAC output test
- Fabric. JS dynamically set font size
- socket(套接字)与socket地址
- 一般来讲,如果频繁出现inconsistent tab and space的报错
- [development environment] StarUML tool (download software | StarUML installation | StarUML creation project)
- threejs的控制器 立方體空間 基本控制器+慣性控制+飛行控制
- Golang quickly generates model and queryset of database tables
- docker mysql
- 删除元素(带过渡动画)
- Fabric.js 上划线、中划线(删除线)、下划线
猜你喜欢

每日学习3

Use of swagger

Pycharm连接远程服务器

PHP linked list creation and traversal

Stm32-dac Experiment & high frequency DAC output test

抓包工具fiddler学习

《可供方案开发》口算训练机/数学宝/儿童口算宝/智能数学宝 LCD液晶显示驱动IC-VK1622(LQFP64封装),原厂技术支持

腾讯云 TStor 统一存储通过信通院首批文件存储基础能力评测

Analysis of CPU surge in production environment service

Design and implementation of car query system based on php+mysql
随机推荐
Penetrate the remote connection database through the Intranet
1. Editing weapon VIM
##51单片机实验之简易验证码发生器
Essential elements of science fiction 3D scenes - City
Basic knowledge of QT original code
腾讯云 TStor 统一存储通过信通院首批文件存储基础能力评测
[deep learning] simple implementation of neural network forward propagation
Certik released the defi security report in 2021, disclosing key data of industry development (PDF download link attached)
Daily learning 3
Dangbei projection 4K laser projection X3 Pro received unanimous praise: 10000 yuan projector preferred
[development environment] 010 editor tool (tool download | binary file analysis template template installation | shortcut key viewing and setting)
途家木鸟美团夏日折扣对垒,门槛低就一定香吗?
Tip: SQL Server blocked the state 'openrowset/opendatasource' of component 'ad hoc distributed queries'
大顶堆、小顶堆与堆排序
Teamtalk source code analysis win client
Fabric. JS upper dash, middle dash (strikethrough), underline
Go operation redis
Convolutional neural network (Introduction)
kaggle如何使用utility script
Advanced usage of C language -- function pointer: callback function; Conversion table