NotionX / NotionX/react-notion-x

LaTeX renderer doesn't fully take into account block type

Open
#279 4 comments 1 reaction 0 assignees View on GitHub

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:
Screen Shot 2022-04-29 at 12 25 32 AM

React-Notion-X:
Screen Shot 2022-04-29 at 12 26 04 AM

Notion Test Page ID

df2adb88d5b34105bc397074001b9b69

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.