nextjs-notion-starter-kit icon indicating copy to clipboard operation
nextjs-notion-starter-kit copied to clipboard

equation render bug

Open yangkang2318 opened this issue 3 years ago • 4 comments

Description

Thanks very much for your app. But I have a equation render bug like this. image It seems that the KaTeX render wrong and the error is that "ParseError: KaTeX parse error: {equation} can be used only in display mode." Could you please tell me how to fix this? Thanks!

Notion Page ID

My notion page ID is d8c0b86e67744763859377c071fbfd07

yangkang2318 avatar May 09 '22 14:05 yangkang2318

It has to be in its own block, i.e. "display mode" of KaTeX. The equation environment can't be rendered inline.

y1zhou avatar May 11 '22 14:05 y1zhou

It has to be in its own block, i.e. "display mode" of KaTeX. The equation environment can't be rendered inline.

I check the code, and found that the inline and block equation in the notion both are treated as "text mode" of KaTeX when render them in the Web. But it should be that the inline equation is treated as “text mode” and block equation is treated as "display mode". So how do I fix that?Thanks!

yangkang2318 avatar May 16 '22 06:05 yangkang2318

Yeah it seems the block equation is detected as notion-equation-block but KaTeX still thinks it's in text mode. Perhaps the issue lies in https://github.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/third-party/equation.tsx?

y1zhou avatar May 16 '22 14:05 y1zhou

I have the same question, is this problem solved now?

ShiinaRinne avatar Sep 13 '22 02:09 ShiinaRinne