当前位置:网站首页>Introduction to mathjax (web display of mathematical formulas, vector)
Introduction to mathjax (web display of mathematical formulas, vector)
2022-07-02 14:48:00 【Xu Tongbao】


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>MathJax Font</title>
<!-- <script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=AM_HTMLorMML"></script> -->
<!-- <script
id="MathJax-script"
async
src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-mml-chtml.js"
></script> -->
<script
id="MathJax-script"
src="./mathjax/es5/tex-mml-chtml.js"
></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
"HTML-CSS" : {
availableFonts : ["STIX"],
preferredFont : "STIX",
webFont : "STIX-Web",
imageFont : null
}
});
</script>
</head>
<body>
<p>
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and
they are \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}.\]
</p>
<p>
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and
they are \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}.\]
</p>
</body>
</html>
stay vue You need to re render the data in order to change the formula :
clearTimeout(timer);
timer = setTimeout(() => {
this.$nextTick(() => {
window.MathJax.typeset();
});
}, 500);
https://jsbin.com/vujogafize/edit?html,output
https://www.osgeo.cn/mathjax/basic/accessibility.html
self-control mathjax Online editor .

<template>
<div>
<div>mathValue:</div>
<p v-html="mathValue"></p>
<el-input
:value="mathValue"
type="textarea"
@input="handleMathValue"
></el-input>
</div>
</template>
<script>
import { MathfieldElement } from "mathlive";
let mf;
export default {
data() {
return {
mathValue: "\\( x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a} \\)",
};
},
mounted() {
this.formatMath();
},
methods: {
formatMath() {
window.MathJax.typeset();
},
handleMathValue(e) {
this.mathValue = e;
this.$nextTick(() => {
this.formatMath();
});
},
},
};
</script>
<style></style>
Rich text can also be :

Online editor :
边栏推荐
- Fabric. Keep the original level when JS element is selected
- STM32标准固件库函数名记忆(二)
- 提示:SQL Server 阻止了对组件‘Ad Hoc Distributed Queries ‘的STATEMENT ‘OpenRowset/OpenDatasource“”
- 2、const 型指针
- [QNX hypervisor 2.2 user manual]6.3 communication between guest and external
- Xilinx Vivado set *.svh as SystemVerilog Header
- LeetCode_字符串_简单_412.Fizz Buzz
- 广州市应急管理局发布7月高温高湿化工安全提醒
- Fabric.js 自由绘制椭圆
- 删除元素(带过渡动画)
猜你喜欢

Fabric.js 自由绘制圆形

Large top heap, small top heap and heap sequencing

Tujia muniao meituan has a discount match in summer. Will it be fragrant if the threshold is low?

JMeter script parameterization

Xilinx Vivado set *. svh as SystemVerilog Header

MathML to latex

Yolov6 training: various problems encountered in training your dataset

YoloV6训练:训练自己数据集遇到的各种问题

ONNX+TensorRT:将预处理操作写入ONNX并完成TRT部署

复用和分用
随机推荐
The most complete analysis of Flink frame window function
字符串匹配问题
mathjax 入门(web显示数学公式,矢量的)
STM32标准固件库函数名记忆(二)
[QNX Hypervisor 2.2用户手册]6.3 Guest与外部之间通信
Fabric. Usage of JS eraser (including recovery function)
Advanced C language (realize simple address book)
Wechat applet uses towxml to display formula
Reuse and distribution
Simple verification code generator for 51 single chip microcomputer experiment
Development and design of animation surrounding mall sales website based on php+mysql
taobao.trades.sold.get-查询卖家已卖出的交易数据(根据创建时间),淘宝店铺卖出订单查询API接口,淘宝R2接口,淘宝oAuth2.0交易接口代码分享
Fabric. JS free drawing ellipse
数据库连接池和数据源
kityformula-editor 配置字号和间距
由粒子加速器产生的反中子形成的白洞
php链表创建和遍历
Teamtalk source code analysis win client
buuctf-pwn write-ups (7)
Fabric. JS manual bold text iText