[PR #325] [MERGED] Add KaTeX support to MarkdownPreviewer and HTML export #724

Closed
opened 2026-03-03 00:22:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BoostIO/BoostNote-App/pull/325
Author: @tobifasc
Created: 1/31/2020
Status: Merged
Merged: 2/6/2020
Merged by: @Rokt33r

Base: masterHead: master


📝 Commits (2)

  • eab759d #227 use remark-math and rehype-katex in MarkdownPreviewer to display katex
  • fea7d2c #227 use remark-math and rehype-katex when exporting html

📊 Changes

5 files changed (+105 additions, -0 deletions)

View changed files

📝 package-lock.json (+90 -0)
📝 package.json (+3 -0)
📝 src/components/atoms/MarkdownPreviewer.tsx (+5 -0)
📝 src/lib/exports.ts (+5 -0)
📝 typings/unified.d.ts (+2 -0)

📄 Description

I used remark-math and rehype-katex to render TeX written inside $...$ or $$...$$.

Inside MarkdownPreviewer it was easy to import katex.min.css from inside node_modules but to get correct styling in exported HTML files (without also exporting css/font files) i added a link tag referring to katex.min.css hosted by jsdelivr.


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BoostIO/BoostNote-App/pull/325 **Author:** [@tobifasc](https://github.com/tobifasc) **Created:** 1/31/2020 **Status:** ✅ Merged **Merged:** 2/6/2020 **Merged by:** [@Rokt33r](https://github.com/Rokt33r) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`eab759d`](https://github.com/BoostIO/BoostNote-App/commit/eab759d5106b69236f2e3bdd0e0ba1041a250a81) #227 use remark-math and rehype-katex in MarkdownPreviewer to display katex - [`fea7d2c`](https://github.com/BoostIO/BoostNote-App/commit/fea7d2c6b321a99fc942ccc168863b8fe9f4ffc4) #227 use remark-math and rehype-katex when exporting html ### 📊 Changes **5 files changed** (+105 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+90 -0) 📝 `package.json` (+3 -0) 📝 `src/components/atoms/MarkdownPreviewer.tsx` (+5 -0) 📝 `src/lib/exports.ts` (+5 -0) 📝 `typings/unified.d.ts` (+2 -0) </details> ### 📄 Description I used [remark-math](https://github.com/remarkjs/remark-math) and [rehype-katex](https://github.com/remarkjs/remark-math/tree/master/packages/rehype-katex) to render TeX written inside `$...$` or `$$...$$`. Inside `MarkdownPreviewer` it was easy to import `katex.min.css` from inside node_modules but to get correct styling in exported HTML files (without also exporting css/font files) i added a link tag referring to `katex.min.css` hosted by jsdelivr. <!-- Issuehunt content --> --- <details> <summary> <b>IssueHunt Summary</b> </summary> ### Referenced issues This pull request has been submitted to: - [#227: KaTeX Implementation in Beta](https://issuehunt.io/repos/74213528/issues/227) --- IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members) </details> <!-- /Issuehunt content--> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 00:22:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#724
No description provided.