当前位置:网站首页>mathjax 入门(web显示数学公式,矢量的)
mathjax 入门(web显示数学公式,矢量的)
2022-07-02 11:23:00 【徐同保】
<!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>
在vue中数据变化后需要重新渲染一下才能更改公式:
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
自制mathjax在线编辑器。
<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>
富文本里也可以:
在线编辑器:
边栏推荐
- 2. Const pointer
- NLA natural language analysis realizes zero threshold of data analysis
- Generally speaking, if the error of inconsistent tab and space occurs frequently
- mongodb的认识
- Fabric.js 元素被选中时保持原有层级
- MQ教程 | Exchange(交换机)
- 卷积神经网络(入门)
- STM32 standard firmware library function name (I)
- Use of freemaker
- Stm32-dac Experiment & high frequency DAC output test
猜你喜欢
Thoroughly master prototype__ proto__、 Relationship before constructor (JS prototype, prototype chain)
Xilinx Vivado set *. svh as SystemVerilog Header
PHP linked list creation and traversal
【空间&单细胞组学】第1期:单细胞结合空间转录组研究PDAC肿瘤微环境
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
QT new project
fatal: unsafe repository is owned by someone else 的解决方法
Available solution development oral arithmetic training machine / math treasure / children's oral arithmetic treasure / intelligent math treasure LCD LCD driver ic-vk1622 (lqfp64 package), original te
[development environment] Dell computer system reinstallation (download Dell OS recovery tool | use Dell OS recovery tool to make USB flash disk system | install system)
<口算练习机 方案开发原理图>口算练习机/口算宝/儿童数学宝/儿童计算器 LCD液晶显示驱动IC-VK1621B,提供技术支持
随机推荐
taobao. trade. memo. Add (add remarks to a transaction) interface, Taobao store flag insertion interface, Taobao order flag insertion API interface, oauth2.0 interface
##51单片机实验之简易验证码发生器
<口算练习机 方案开发原理图>口算练习机/口算宝/儿童数学宝/儿童计算器 LCD液晶显示驱动IC-VK1621B,提供技术支持
buuctf-pwn write-ups (7)
taobao. trades. sold. Get query the transaction data that the seller has sold (according to the creation time), Taobao store sales order query API interface, Taobao R2 interface, Taobao oauth2.0 trans
Some interview suggestions for Android programmers "suggestions collection"
什么是 eRDMA?丨科普漫画图解
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
篇9:XShell免费版安装
Threejs controller cube space basic controller + inertia control + flight control
Check password
Contrôleur pour threejs cube Space Basic Controller + Inertial Control + Flight Control
How kaggle uses utility script
Fabric.js 自由绘制圆形
Development and design of animation surrounding mall sales website based on php+mysql
Use of swagger
Fatal: unsafe repository is owned by someone else
Understanding of mongodb
OpenHarmony笔记-----------(四)
1、编辑利器vim