0π
β
I later discovered that this was a compatibility issue with browsers.
Some browsers do not render math tags
-1π
I suspect youβre using something like
<p>{{ mathTag }}</p>
when what you should be using is v-html
β¦
<p v-html="mathTag"></p>
or even better, assuming itβs the specific MathML tags you want to render dynamically, <component>
new Vue({
data: () => ({
operation: 'msqrt',
identifiers: ['x', 'y']
})
}).$mount('#app')
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<div id="app">
<math>
<component :is="operation">
<mi v-for="(identifier, i) in identifiers" :key="i">{{ identifier }}</mi>
</component>
</math>
</div>
Source:stackexchange.com