About me 👋
-
🔭 I’m currently working on Frontend development
-
🌱 Sharing awesome-my-website, Learning, Work, Entertainment, My Star, Catch all in one draft.
-
⚡ Sharing My blog, Hoping it can be updated frequently
此工程为公式在线编辑demo
Home Page: https://zzugbb.github.io/formula-edit/
License: MIT License
About me 👋
🔭 I’m currently working on Frontend development
🌱 Sharing awesome-my-website, Learning, Work, Entertainment, My Star, Catch all in one draft.
⚡ Sharing My blog, Hoping it can be updated frequently
本文档主要对公式渲染组件 MathJax
整体部署及使用加以说明。
2018-07-25
MathJax
是一个 JavaScript
引擎,用来显示网络上的数学公式。它可以工作于所有流行的浏览器上。
MathType
公式 都转化为了 latex
公式代码。
接口将其题目查出后返回到页面展示层,为了能够正确展示给用户看,需要用到渲染组件MathJax
。
使用组件渲染前的题目效果
使用组件渲染后的题目效果
<script type="text/javascript" src="/MathJax/2.7.2/MathJax.js?config=TeX-AMS_CHTML"></script>
<div>$\frac{x^3}{e^x-1}$</div>
MathJax.Hub.Config({
showProcessingMessages: false,
messageStyle: "none",
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"],["\[","\]"]]},
});
试题相关信息可能是页面发异步请求而得到的,由于js执行顺序的问题,此时需要在渲染完毕的回调中加入代码,保证能够正确渲染。
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.