How to enable katex symbols in latex rendered via mathjax?

Asked

Viewed 18 times

2

In the company where I work we have a content production team that writes all the content in Notion using the Equations functionality that they provide. To parse this content we create a lib which allows us to parse this html content.

This content is rendered by the frontend using lib mathjax in version 3.0.1. The problem is that notion uses katex, while mathjax only renders latex. Therefore, there are some symbols (such as R for the Real set symbol) that cannot be rendered by mathjax. I kick that there is some plugin to enable the rendering of these symbols but really could not find anything about.

Here an example of page with problems in rendering the symbol of the real ones

And below the Mathjax startup code on our page

<script type="text/javascript">
  window.MathJax = {

    tex: {
      inlineMath: [
        [
          '$', '$'
        ],
        [
          '\\(', '\\)'
        ]
      ],
      processEscapes: true
    },
    svg: {
      fontCache: 'global'
    },
    options: {
      renderActions: {
        addMenu: [0, '', ''] // Hide menu
      }
    },
    extensions: [
      "mml2jax.js", "tex2jax.js"
    ],
    showMathMenu: false,
    skipStartupTypeset: true,
    showProcessingMessages: false,
    messageStyle: "none",
    jax: ["input/MathML", "output/CommonHTML", "input/TeX", "output/HTML-CSS"]
  };
</script>

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>

<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-svg.js"></script>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.