当前位置:网站首页>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>
富文本里也可以:

在线编辑器:
边栏推荐
- Chinese science and technology from the Winter Olympics (III): the awakening and evolution of digital people
- STM32 library function for GPIO initialization
- 4、数组指针和指针数组
- Fabric.js 缩放画布
- taobao.trade.get( 获取单笔交易的部分信息),淘宝店铺订单接口,淘宝oAuth2.0接口,淘宝R2接口代码对接分享
- Packet capturing tool Fiddler learning
- Essential elements of science fiction 3D scenes - City
- Start to write a small demo - three piece chess
- 大顶堆、小顶堆与堆排序
- Stm32-dac Experiment & high frequency DAC output test
猜你喜欢

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

The most complete analysis of Flink frame window function

Design and implementation of car query system based on php+mysql

Yolov6 training: various problems encountered in training your dataset

The use of TestNG, the testing framework (II): the use of TestNG XML

There is no solution to the decryption error of the remote user 'sa' and the service master password mapped from the remote server 'to the local user' (null) /sa '

Packet capturing tool Fiddler learning

< schéma de développement de la machine d'exercice oral > machine d'exercice oral / trésor d'exercice oral / trésor de mathématiques pour enfants / lecteur LCD de calculatrice pour enfants IC - vk1621

Thoroughly master prototype__ proto__、 Relationship before constructor (JS prototype, prototype chain)

buuctf-pwn write-ups (7)
随机推荐
大顶堆、小顶堆与堆排序
Basic knowledge of QT original code
[development environment] Dell computer system reinstallation (download Dell OS recovery tool | use Dell OS recovery tool to make USB flash disk system | install system)
Fabric. Usage of JS eraser (including recovery function)
PTA question bank== > complex four operations, one for one, examination seat number (7-73)
Packet capturing tool Fiddler learning
什么是 eRDMA?丨科普漫画图解
Start to write a small demo - three piece chess
Golang quickly generates model and queryset of database tables
Quick analysis: easy to share the Internet
Fabric. JS manual bold text iText
STM32库函数进行GPIO初始化
taobao.trades.sold.get-查询卖家已卖出的交易数据(根据创建时间),淘宝店铺卖出订单查询API接口,淘宝R2接口,淘宝oAuth2.0交易接口代码分享
TeamTalk源码分析之win-client
Yolov6 training: various problems encountered in training your dataset
taobao. logistics. dummy. Send (no logistics delivery processing) interface, Taobao store delivery API interface, Taobao order delivery interface, Taobao R2 interface, Taobao oau2.0 interface
fatal: unsafe repository is owned by someone else 的解决方法
PHP linked list creation and traversal
Check password
taobao.logistics.dummy.send( 无需物流发货处理 )接口,淘宝店铺发货API接口,淘宝订单发货接口,淘宝r2接口,淘宝oAu2.0接口