MatejBransky / react-katex

Display math in TeX with KaTeX and ReactJS
https://codesandbox.io/s/github/MatejMazur/react-katex/tree/master/demo?fontsize=14&hidenavigation=1&module=%2Fsrc%2FExample.tsx&theme=dark
MIT License
147 stars 12 forks source link

No display mode & doesn’t work in Chrome? #6

Closed lensbart closed 4 years ago

lensbart commented 5 years ago

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'
  }}
/>

Any help would be greatly appreciated!

shilangyu commented 4 years ago

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

MatejBransky commented 4 years ago

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).