Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
MathJax method typesetClear() doesn't work

MathJax does not forget the previous math and rendering is not correct. Many formulas are rendered instead of one.

I used this docimentation https://docs.mathjax.org/en/latest/web/typeset.html?highlight=mathml2svg#updating-previously-typeset-content

new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  data() {
    return {
      value: '$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$',
    };
  },
  
  template: `
  
        <div class="math-jax-container">
          <v-textarea
            v-model="value"
          />
          <div
            id="maththt"
            ref="mathJax"
          >
            {{ value }}
          </div>
        </div>
  `,
  
  watch: {
    value(v) {
      this.renderMathJax();
    },
  },
  
  methods: {
   renderMathJax() {
      window.MathJax.typesetClear([this.$refs.mathJax]);
      window.MathJax.typeset([this.$refs.mathJax]);
    }
  },
})
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" async></script>
<div id="app"></div>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!