0.0.18 • Published 3 years ago

mathjax3-vue v0.0.18

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

mathjax3-vue

  • This plugins implements the browser version of Mathjax v3 into vue.

  • Support vue2 and vue3

  • Click to view online example:online example

online

electron-vite-react-debug.gif

Install

yarn add mathjax3-vue

Use vue2

1.main.js config of MathJax3

import YyMathjax from 'mathjax3-vue'
const config={
    tex: {
        inlineMath: [['$', '$']],
        processEscapes: true
    }
}
Vue.use(YyMathjax,config)

2. App.vue

<template>
  <div>
    <yy-mathjax :latex="latexStr"></yy-mathjax>
    <div>input:abc$\frac{2}{3}$def</div>
    <textarea type='textarea' v-model='latexStr'/>
  </div>
</template>

<script>
export default {
  name: "App",
  components: {
  },
  data(){
    return {
      latexStr:""
    }
  }
};
</script>

<style>
</style>

Use vue3

1.main.js config of MathJax3

import { createApp } from 'vue'
import App from './App.vue'

import YyMathjax from 'mathjax3-vue'
const config={
    tex: {
        inlineMath: [['$', '$']],
        processEscapes: true
    }
}

createApp(App).use(YyMathjax,config).mount('#app')

2. App.vue

<template>
    <yy-mathjax :latex="latexStr"></yy-mathjax>
    <div>input:abc$\frac{2}{3}$def</div>
    <textarea type='textarea' v-model='latexStr'/>
</template>

<script>
export default {
  name: "App",
  components: {
  },
  data(){
    return {
      latexStr:""
    }
  }
};
</script>

<style>
</style>
0.0.10

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.9

3 years ago

0.0.16

3 years ago

0.0.8

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago