react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

Cannot render Latex Chemical Equations

Open e9965 opened this issue 3 years ago • 6 comments
trafficstars

image image

e9965 avatar Apr 03 '22 03:04 e9965

Please follow the issue template.

E.g., what notion ID can I test this with?

It is working if you're using the library correctly; see here for a demo: https://react-notion-x-demo.transitivebullsh.it/7820b2d5300747b38e31344eb06fbd57

transitive-bullshit avatar Apr 03 '22 22:04 transitive-bullshit

Hi Devs, I am trying to render this notion page: [Public Notion URL]. The rendered site with react-notion-x is [ here ] using the nextjs-notion-starter-kit.

As you can see, the Latex Chemical Equations can not be rendered correctly.

Thanks in advance!

tangly1024 avatar Apr 06 '22 06:04 tangly1024

would you please reopen this issues? @transitive-bullshit

tangly1024 avatar Apr 06 '22 06:04 tangly1024

Thanks for the repro case @tangly1024.

It definitely looks like a bug.

I'm not sure if this is a bug in our equation handling or in katex's rendering (which is what we're using under the hood to render things).

transitive-bullshit avatar Apr 06 '22 10:04 transitive-bullshit

Hmmm, it looks like \ce and other chemistry-oriented latex features may not be included in katex by default. https://github.com/KaTeX/KaTeX/blob/b1311aff1bfeebd75df9389aadfba7a4a697b203/contrib/mhchem/README.md

transitive-bullshit avatar Apr 06 '22 10:04 transitive-bullshit

Thank you for your help, this solves my questions.

tangly1024 avatar Apr 07 '22 01:04 tangly1024