MatejBransky/react-katex

No display mode & doesn’t work in Chrome?

lensbart opened this issue · 2 comments

Hello,

Thanks for making this package. I ran into a couple of issues when trying to render a simple formula:

<TeX
  block
  math={String.raw`F(x) = \int^a_b \frac{1}{3}x^3`}
  settings={{
    displayMode: true,
    output: 'mathml'
  }}
/>
  • This doesn’t render in display mode (I tried with and without block and settings.displayMode)
  • The default output is htmlAndMathml, just like KaTeX, but this does not correspond with the live examples (maybe because another version is used under the hood?)
  • The output doesn’t render in Chrome on macOS Catalina, but it does on Safari & Firefox

Any help would be greatly appreciated!

Did you try rendering it with the same option directly with katex? Maybe it's a katex issue

Chrome doesn't support MathML.

If you need to render the required math expression than you can remove the output property because it renders with the option htmlAndMathml by default (see docs for katex).