Skip to content

feat: add LaTeX math formula rendering support#499

Open
MuLeiSY2021 wants to merge 1 commit intoAsyncFuncAI:mainfrom
MuLeiSY2021:feat/latex-math-rendering
Open

feat: add LaTeX math formula rendering support#499
MuLeiSY2021 wants to merge 1 commit intoAsyncFuncAI:mainfrom
MuLeiSY2021:feat/latex-math-rendering

Conversation

@MuLeiSY2021
Copy link
Copy Markdown

Summary

  • Add remark-math and rehype-katex plugins to render LaTeX math expressions in wiki pages
  • Import KaTeX CSS for proper formula styling
  • Both inline ($...$) and display ($$...$$) math are now supported

Closes #498

Changes

  • package.json: added remark-math@^6.0.0 and rehype-katex@^7.0.1
  • src/components/Markdown.tsx: imported and enabled the two plugins, imported katex/dist/katex.min.css

Test plan

  • Open a wiki page containing LaTeX math formulas
  • Verify inline math ($...$) renders correctly
  • Verify display math ($$...$$) renders correctly
  • Verify existing markdown (tables, code blocks, mermaid diagrams) still works

🤖 Generated with Claude Code

Add remark-math and rehype-katex plugins to the Markdown component
so that LaTeX math expressions (both inline `$...$` and display `$$...$$`)
are rendered correctly in wiki pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for rendering mathematical expressions in Markdown by integrating the remark-math and rehype-katex plugins. The changes include adding the necessary dependencies to package.json and package-lock.json, and updating the Markdown component to utilize these plugins along with the KaTeX CSS for proper styling. I have no feedback to provide.

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

Successfully merging this pull request may close these issues.

LaTeX math formulas not rendered in wiki pages

1 participant