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

KaTeX Display Mode (non-inline math) not working #751

Closed
4 tasks done
AnuragGowda opened this issue Jul 13, 2023 · 3 comments
Closed
4 tasks done

KaTeX Display Mode (non-inline math) not working #751

AnuragGowda opened this issue Jul 13, 2023 · 3 comments
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on

Comments

@AnuragGowda
Copy link

AnuragGowda commented Jul 13, 2023

Initial checklist

Affected packages and versions

react-markdown@8.0.3

Link to runnable example

https://codesandbox.io/s/react-math-markdown-forked-tqxgnp?file=/src/math.js

Steps to reproduce

https://codesandbox.io/s/react-math-markdown-forked-tqxgnp?file=/src/math.js

Expected behavior

Display mode math should appear on separate line, html should be tagged with class math-display

Actual behavior

Math appears inline, html has class 'math-inline'

Runtime

Node v17

Package manager

npm 8

OS

Windows

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jul 13, 2023
@ChristianMurphy
Copy link
Member

Welcome @AnuragGowda! 👋
A newline determines where math is inline or block, not the number of dollars.
Please see the readme of remark-math for examples https://github.com/remarkjs/remark-math/tree/main/packages/remark-math#syntax

@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2023
@ChristianMurphy ChristianMurphy added the 🤷 no/invalid This cannot be acted upon label Jul 13, 2023
@github-actions

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Jul 13, 2023
@kkensuke
Copy link

kkensuke commented Apr 30, 2024

Thanks, @ChristianMurphy !
Finally, I understand what is the problem.
For Latex users, the following notation is completely the same for block equations, which confuses me a lot.

🚫:

$$ a + b = c $$

✅:

$$
a + b = c
$$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

3 participants