Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The equation component did not handle inline and block equations correctly. #301

Open
Thooooor opened this issue Jun 7, 2022 · 7 comments

Comments

@Thooooor
Copy link

Thooooor commented Jun 7, 2022

Description

When deal with block equations, we should set "displayMode" to True.
As shown below, the block formula should be centered instead of left:
image
Besides, some usages like "\tag" is only available in display mode, see:
image
The error is:
image
To solve this problem, we only need to add 'displayMode', and I already PR #281 .

Notion Test Page ID

This is my notion blog page which has this problem: pinn-blog
This is the origin notion page: pinn-notion

@jacksongoode
Copy link

@Thooooor do you have an example of it being fixed in your blog?

@zfhxi
Copy link

zfhxi commented Dec 21, 2022

I met the same problem, is there any solution?

@jacksongoode
Copy link

Ugh, I had to call the js auto-render extension on top of everything in the mean time.

@zfhxi
Copy link

zfhxi commented Dec 26, 2022

Ugh, I had to call the js auto-render extension on top of everything in the mean time.

Thanks for your reply, I have tried this solution. However, it doesn't work.

@zfhxi
Copy link

zfhxi commented Feb 7, 2023

I am not an expert in react. I found that downgrading to v4.11.0 may help, but I still have no idea about how to solve this elegantly.:joy:

@jacksongoode
Copy link

jacksongoode commented Feb 7, 2023

Sorry to follow up late. Did you call the auto render after the equations have rendered the first time?

Here's how we did it. You'll need the katex and auto render js loaded before as well.

@zfhxi
Copy link

zfhxi commented Feb 7, 2023

Sorry to follow up late. Did you call the auto render after the equations have rendered the first time?

Here's how we did it. You'll need the katex and auto render js loaded before as well.

Thanks for your reply, I have tried your solution from https://github.com/nline/nline-blog. That seems like it should work, but doesn't.
In notion

In blog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants