Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

430
Visualizações
How to not show parsing error in MathJax?

I am using MathJax for showing equations on my webpage. Using the below config script. But in case of syntax error, I Don't wanna show the exception instead it should show the Jax as it is. Gone through about formatError in here https://docs.mathjax.org/en/latest/options/input/tex.html but How to use it? tried a couple of methods but it does not help.

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    showMathMenu: false,
    extensions: ["tex2jax.js"],
    messageStyle: "none",
    showProcessingMessages : false,
    jax: ["input/TeX", "output/SVG"],
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
      processEscapes: true,
      preview: "none",
      
    },
    processEnvironments: true,
  });
</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js"></script>

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You probably want to use the noUndefined and noErrors extensions. The first will cause undefined macros to show as a red version of the macro name, but will typeset the rest of the expression. For example x + \3 would appear as

enter image description here

rather than the undefined control sequence message that you are seeing above.

The second causes any other type of error to just display the original TeX code rather than the error message. So \frac{a}{b with a missing close brace would just display as \frac{a}{b rather than the error message.

To do this, you would add

TeX: {
  extensions: ['noErrors.js', 'noUndefined.js']
},

to your configuration. See the documentation for noUndefined and noErrors for more details.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda