NotionX / NotionX/react-notion-x
LaTeX renderer doesn't fully take into account block type
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Description
In Notion, there are both inline equations and block equations. They should be rendered differently, however it appears that react-notion-x doesn't take this into account. For instance, in Notion, integrals appear small in inline equations and large in block equations. In react-notion-x, however, they appear the same way (small). I believe passing the displayMode option in KaTeX rectifies this problem, as mentioned in the KaTeX documentation. The exact way to do this though might be a little different since a react wrapper package is used.
Notion:

React-Notion-X:

Notion Test Page ID
df2adb88d5b34105bc397074001b9b69
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the LaTeX rendering path in react-notion-x and how the react-katex wrapper receives KaTeX options. Use Notion test page df2adb88d5b34105bc397074001b9b69 to compare inline and block equations; done means their integral sizing matches Notion by distinguishing display mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100