vue-mathjax-v3
v0.0.1
Published
Mathjax v3 for vue 3
Downloads
5
Readme
vue-mathjax-v3
Install
- Add the config and a link to mathjax in index.html For example:
<script>
window.MathJax = {
tex: {
inlineMath: [['$', '$']],
displayMath: [['$$', '$$']],
processEscapes: true,
processEnvironments: true,
},
options: {
enableMenu: false,
},
chtml: {
displayAlign: 'left'
},
};
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" id="MathJax-script"></script>
- Install vue-mathjax-v3
npm install -S vue-mathjax-v3
Use example
<script setup>
import MathJax from "vue-mathjax-v3";
</script>
<template>
<MathJax :formula="'$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$'" />
</template>