0.0.1 • Published 2 years ago

vue-mathjax-v3 v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue-mathjax-v3

Install

1) 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>

2) 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>
0.0.1

2 years ago