diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51ec16aa9..5feeba477 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,6 +48,7 @@
- The `[name=...]`, `[time=...]` and `[color=...]` tags may now be used anywhere in the document and not just inside of blockquotes and lists.
- The (add image) and (add link) toolbar buttons, put selected links directly in the `()` instead of the `[]` part of the generated markdown
- The help dialog has multiple tabs, and is a bit more organized.
+- Use KaTeX instead of MathJax. ([Why?](https://community.codimd.org/t/frequently-asked-questions/190))
---
diff --git a/cypress/integration/link.spec.ts b/cypress/integration/link.spec.ts
index ab1cc19ae..f36add4d7 100644
--- a/cypress/integration/link.spec.ts
+++ b/cypress/integration/link.spec.ts
@@ -92,7 +92,7 @@ describe('Links Intro', () => {
.should('include', '/features#Share-Notes')
})
- it('MathJax', () => {
+ it('KaTeX', () => {
cy.get('i.fa-bar-chart.fa-3x')
.click()
cy.url()
diff --git a/package.json b/package.json
index dab995ee4..cedb8ef76 100644
--- a/package.json
+++ b/package.json
@@ -3,6 +3,7 @@
"license": "AGPL-3.0",
"version": "0.1.0",
"dependencies": {
+ "@matejmazur/react-katex": "^3.1.3",
"@testing-library/jest-dom": "5.11.4",
"@testing-library/react": "10.4.9",
"@testing-library/user-event": "12.1.2",
@@ -22,7 +23,6 @@
"@types/react-bootstrap-typeahead": "3.4.6",
"@types/react-dom": "16.9.8",
"@types/react-html-parser": "2.0.1",
- "@types/react-mathjax": "1.0.0",
"@types/react-redux": "7.1.9",
"@types/react-router": "5.1.8",
"@types/react-router-bootstrap": "0.24.5",
@@ -48,6 +48,7 @@
"i18next-browser-languagedetector": "6.0.1",
"i18next-http-backend": "1.0.18",
"js-yaml": "3.14.0",
+ "katex": "^0.12.0",
"markdown-it": "11.0.0",
"markdown-it-abbr": "1.0.4",
"markdown-it-anchor": "5.3.0",
@@ -66,7 +67,6 @@
"markdown-it-sup": "1.0.0",
"markdown-it-task-lists": "2.1.1",
"markdown-it-toc-done-right": "4.1.0",
- "mathjax": "3.0.5",
"moment": "2.27.0",
"node-sass": "4.14.1",
"react": "16.13.1",
@@ -76,7 +76,6 @@
"react-dom": "16.13.1",
"react-html-parser": "2.0.2",
"react-i18next": "11.7.1",
- "react-mathjax": "1.0.1",
"react-redux": "7.2.1",
"react-router": "5.2.0",
"react-router-bootstrap": "0.25.0",
@@ -142,10 +141,10 @@
"cypress": "5.0.0",
"eslint-plugin-chai-friendly": "0.6.0",
"eslint-plugin-cypress": "2.11.1",
+ "http-server": "0.12.3",
"redux-devtools": "3.6.1",
"redux-devtools-extension": "2.13.8",
- "ts-loader": "8.0.2",
- "http-server": "0.12.3"
+ "ts-loader": "8.0.2"
},
"resolutions": {
"cypress": "5.0.0"
diff --git a/public/locales/ar.json b/public/locales/ar.json
index a2ec86e2d..5cbea630d 100644
--- a/public/locales/ar.json
+++ b/public/locales/ar.json
@@ -8,7 +8,7 @@
"exploreFeatures": "استكشف جميع الميزات",
"features": {
"collaboration": "تعاون آني",
- "mathJax": "دعم المنحنيات البيانية و MathJax",
+ "katex": "دعم المنحنيات البيانية و KaTeX",
"slides": "دعم الشرائح التقديمية"
}
},
diff --git a/public/locales/ca.json b/public/locales/ca.json
index 7490230fd..7f3539445 100644
--- a/public/locales/ca.json
+++ b/public/locales/ca.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Explorar totes les funcions",
"features": {
"collaboration": "Col·laborar a través de URL",
- "mathJax": "Soport per a gràfics i MathJax",
+ "katex": "Soport per a gràfics i KaTeX",
"slides": "Soport per a diapositives"
}
},
diff --git a/public/locales/cs.json b/public/locales/cs.json
index 13100d485..c3a6d99eb 100644
--- a/public/locales/cs.json
+++ b/public/locales/cs.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Prozkoumat všechny funkce",
"features": {
"collaboration": "Spolupráce v reálném čase",
- "mathJax": "Funguje s grafy a MathJax",
+ "katex": "Funguje s grafy a KaTeX",
"slides": "Podporuje režim prezentace"
}
},
diff --git a/public/locales/da.json b/public/locales/da.json
index 79a5a1210..461588f3a 100644
--- a/public/locales/da.json
+++ b/public/locales/da.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Udforsk alle features",
"features": {
"collaboration": "Samarbejd via URL",
- "mathJax": "Mulighed for diagrammer og MathJax",
+ "katex": "Mulighed for diagrammer og KaTeX",
"slides": "Mulighed for præsentationer"
}
},
diff --git a/public/locales/de.json b/public/locales/de.json
index bd4406acd..98b5c9a4e 100644
--- a/public/locales/de.json
+++ b/public/locales/de.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Alle Funktionen",
"features": {
"collaboration": "Zusammenarbeiten mit URL",
- "mathJax": "Unterstützt Charts und MathJax",
+ "katex": "Unterstützt Charts und KaTeX",
"slides": "Unterstützt Präsentationsmodus"
}
},
diff --git a/public/locales/el.json b/public/locales/el.json
index 4ec885ae9..5adfc5232 100644
--- a/public/locales/el.json
+++ b/public/locales/el.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Ανακαλύψτε όλες τις λειτουργίες",
"features": {
"collaboration": "Συνεργαστείτε με URL",
- "mathJax": "Υποστηρίζει διαγράμματα και MathJax",
+ "katex": "Υποστηρίζει διαγράμματα και KaTeX",
"slides": "Υποστηρίζει λειτουργία συρσίματος"
}
},
diff --git a/public/locales/en.json b/public/locales/en.json
index f9aaea6d6..8fdf0ff1a 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Explore all features",
"features": {
"collaboration": "Real time collaboration",
- "mathJax": "Works with charts and MathJax",
+ "katex": "Works with charts and KaTeX",
"slides": "Supports slide mode"
},
"screenShotAltText": "CodiMD Screenshot"
diff --git a/public/locales/eo.json b/public/locales/eo.json
index 5165bff93..e472604e6 100644
--- a/public/locales/eo.json
+++ b/public/locales/eo.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Esploru ĉiujn eblecojn",
"features": {
"collaboration": "Kunlaboru per URL",
- "mathJax": "Ebleco por skemoj kaj MathJax",
+ "katex": "Ebleco por skemoj kaj KaTeX",
"slides": "Ebleco por bildvica modo"
}
},
diff --git a/public/locales/es.json b/public/locales/es.json
index c783df447..e411d894b 100644
--- a/public/locales/es.json
+++ b/public/locales/es.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Explorar todas las funciones",
"features": {
"collaboration": "Colaborar via URL",
- "mathJax": "Soporte para gráficos y MathJax",
+ "katex": "Soporte para gráficos y KaTeX",
"slides": "Soporte para diapositivas"
}
},
diff --git a/public/locales/fr.json b/public/locales/fr.json
index 191917fd6..971b5acca 100644
--- a/public/locales/fr.json
+++ b/public/locales/fr.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Explorer toutes les fonctionnalités",
"features": {
"collaboration": "Collaborez avec l'URL",
- "mathJax": "Gère les graphiques et MathJax",
+ "katex": "Gère les graphiques et KaTeX",
"slides": "Gère le mode présentation"
}
},
diff --git a/public/locales/hi.json b/public/locales/hi.json
index f547a17f1..71d70c7f8 100644
--- a/public/locales/hi.json
+++ b/public/locales/hi.json
@@ -8,7 +8,7 @@
"exploreFeatures": "सभी सुविधाओं का अन्वेषण करें",
"features": {
"collaboration": "यूआरएल के साथ सहयोग करें",
- "mathJax": "चार्ट और MathJax का समर्थन",
+ "katex": "चार्ट और KaTeX का समर्थन",
"slides": "स्लाइड मोड का समर्थन"
}
},
diff --git a/public/locales/hr.json b/public/locales/hr.json
index 2e2e599b1..0684e7a78 100644
--- a/public/locales/hr.json
+++ b/public/locales/hr.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Istraži sve značajke",
"features": {
"collaboration": "Kolaboracija sa URL-om",
- "mathJax": "Support charts and MathJax",
+ "katex": "Support charts and KaTeX",
"slides": "Način podrške slajda"
}
},
diff --git a/public/locales/id.json b/public/locales/id.json
index deb0d98af..5f7df55aa 100644
--- a/public/locales/id.json
+++ b/public/locales/id.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Jelajahi semua fitur",
"features": {
"collaboration": "Kolaborasi real-time",
- "mathJax": "Mendukung charts dan MathJax",
+ "katex": "Mendukung charts dan KaTeX",
"slides": "Mendukung mode slide"
}
},
diff --git a/public/locales/it.json b/public/locales/it.json
index 1bb8dfd62..ab96acb37 100644
--- a/public/locales/it.json
+++ b/public/locales/it.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Esplora tutte le funzioni",
"features": {
"collaboration": "Collabora tramite URL",
- "mathJax": "Supporta grafici e MathJax",
+ "katex": "Supporta grafici e KaTeX",
"slides": "Supporta modalità slide"
}
},
diff --git a/public/locales/ja.json b/public/locales/ja.json
index 944ae94b3..b64c8c34a 100644
--- a/public/locales/ja.json
+++ b/public/locales/ja.json
@@ -8,7 +8,7 @@
"exploreFeatures": "すべての機能をチェック",
"features": {
"collaboration": "URLで共同編集",
- "mathJax": "グラフとMathJaxのサポート",
+ "katex": "グラフとKaTeXのサポート",
"slides": "スライドモードのサポート"
}
},
diff --git a/public/locales/ko.json b/public/locales/ko.json
index 50e771145..81443d05a 100644
--- a/public/locales/ko.json
+++ b/public/locales/ko.json
@@ -8,7 +8,7 @@
"exploreFeatures": "모든 기능 둘러보기",
"features": {
"collaboration": "URL을 통한 실시간 협업",
- "mathJax": "차트와 MathJax 지원",
+ "katex": "차트와 KaTeX 지원",
"slides": "슬라이드 모드 지원"
}
},
diff --git a/public/locales/nl.json b/public/locales/nl.json
index 396fe73ed..f86c8e1d6 100644
--- a/public/locales/nl.json
+++ b/public/locales/nl.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Ontdek alle features",
"features": {
"collaboration": "Samenwerken met URL",
- "mathJax": "Ondersteunt grafieken en MathJax",
+ "katex": "Ondersteunt grafieken en KaTeX",
"slides": "Ondersteunt presentatiemodus"
}
},
diff --git a/public/locales/pl.json b/public/locales/pl.json
index c1e8e6548..e238af116 100644
--- a/public/locales/pl.json
+++ b/public/locales/pl.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Przeglądaj wszystkie funkcje",
"features": {
"collaboration": "Kolaboracja w czasie rzeczywistym",
- "mathJax": "Kompatybilne z wykresami oraz MathJax",
+ "katex": "Kompatybilne z wykresami oraz KaTeX",
"slides": "Obsługuje tryb slajdów"
}
},
diff --git a/public/locales/pt.json b/public/locales/pt.json
index 43e768998..d6c7a4360 100644
--- a/public/locales/pt.json
+++ b/public/locales/pt.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Explore todas as funções",
"features": {
"collaboration": "Colaborar via URL",
- "mathJax": "Suporte para gráficos e MathJax",
+ "katex": "Suporte para gráficos e KaTeX",
"slides": "Suporte para modo apresentação"
}
},
diff --git a/public/locales/ru.json b/public/locales/ru.json
index 926206b0f..eaad12c6d 100644
--- a/public/locales/ru.json
+++ b/public/locales/ru.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Изучите все возможности",
"features": {
"collaboration": "Сотрудничество по ссылке",
- "mathJax": "Поддержка графиков и MathJax",
+ "katex": "Поддержка графиков и KaTeX",
"slides": "Поддержка режима слайдера"
}
},
diff --git a/public/locales/sk.json b/public/locales/sk.json
index 9ce2d2e10..7c01469fd 100644
--- a/public/locales/sk.json
+++ b/public/locales/sk.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Preskúmať všetky funkcie",
"features": {
"collaboration": "Spolupráca v reálnom čase",
- "mathJax": "Funguje s grafmi a MathJax",
+ "katex": "Funguje s grafmi a KaTeX",
"slides": "Podporuje prezentačný režim"
}
},
diff --git a/public/locales/sr.json b/public/locales/sr.json
index 6f1ef4a71..907770ae1 100644
--- a/public/locales/sr.json
+++ b/public/locales/sr.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Истражи све могућности",
"features": {
"collaboration": "Сарадња уз помоћ URL-а",
- "mathJax": "Подршка за графиконе и MathJax",
+ "katex": "Подршка за графиконе и KaTeX",
"slides": "Подршка за слајдове и презентације"
}
},
diff --git a/public/locales/sv.json b/public/locales/sv.json
index edac49c13..e379bd023 100644
--- a/public/locales/sv.json
+++ b/public/locales/sv.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Upptäck alla funktioner",
"features": {
"collaboration": "Samarbeta med URL",
- "mathJax": "Stöd för diagram och MathJax",
+ "katex": "Stöd för diagram och KaTeX",
"slides": "Stöd för slide mode"
}
},
diff --git a/public/locales/tr.json b/public/locales/tr.json
index 7ec7593fb..5bd81254b 100644
--- a/public/locales/tr.json
+++ b/public/locales/tr.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Özellikleri keşfet",
"features": {
"collaboration": "URL ile katkıda bulun",
- "mathJax": "Grafikler ve MathJax'ı destekle",
+ "katex": "Grafikler ve KaTeX'ı destekle",
"slides": "Sunum modunu destekle"
}
},
diff --git a/public/locales/uk.json b/public/locales/uk.json
index 0f21fda4e..ba796215b 100644
--- a/public/locales/uk.json
+++ b/public/locales/uk.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Дослідити всі можливості",
"features": {
"collaboration": "Спільна робота по URL",
- "mathJax": "Підтримка графіків і MathJax",
+ "katex": "Підтримка графіків і KaTeX",
"slides": "Підтримка режиму слайдера"
}
},
diff --git a/public/locales/vi.json b/public/locales/vi.json
index f89a34e48..a54f19a5c 100644
--- a/public/locales/vi.json
+++ b/public/locales/vi.json
@@ -8,7 +8,7 @@
"exploreFeatures": "Khám phá tất cả tính năng",
"features": {
"collaboration": "Cộng tác thời gian thực",
- "mathJax": "Làm việc với biểu đồ và MathJax",
+ "katex": "Làm việc với biểu đồ và KaTeX",
"slides": "Hỗ trợ chế độ slide"
}
},
diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.json
index f8bcdf077..56cfef610 100644
--- a/public/locales/zh-CN.json
+++ b/public/locales/zh-CN.json
@@ -8,7 +8,7 @@
"exploreFeatures": "探索所有功能",
"features": {
"collaboration": "实时协作",
- "mathJax": "支持图表与 MathJax",
+ "katex": "支持图表与 KaTeX",
"slides": "支持幻灯模式"
}
},
diff --git a/public/locales/zh-TW.json b/public/locales/zh-TW.json
index f0b83886c..b947bcb91 100644
--- a/public/locales/zh-TW.json
+++ b/public/locales/zh-TW.json
@@ -8,7 +8,7 @@
"exploreFeatures": "探索所有功能",
"features": {
"collaboration": "使用網址協作",
- "mathJax": "支援圖表與 MathJax",
+ "katex": "支援圖表與 KaTeX",
"slides": "支援簡報模式"
}
},
diff --git a/src/components/intro-page/feature-links.tsx b/src/components/intro-page/feature-links.tsx
index 79f5ce819..6b6badfbe 100644
--- a/src/components/intro-page/feature-links.tsx
+++ b/src/components/intro-page/feature-links.tsx
@@ -20,7 +20,7 @@ export const FeatureLinks: React.FC = () => {