From a40cc4fa3ef3494c7402965aa5bdcf3b7ccb9908 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Thu, 24 Sep 2020 18:27:57 +0100 Subject: [PATCH 1/3] added katex.min.css to webpack for math support --- webpack.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 23db22890b..b61a3e952f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -41,6 +41,9 @@ module.exports = (env, argv) => { "jitsi": "./src/vector/jitsi/index.ts", "usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.js", + // CSS for math outout + "katex": "./node_modules/matrix-react-sdk/node_modules/katex/dist/katex.min.css", + // CSS themes "theme-legacy": "./node_modules/matrix-react-sdk/res/themes/legacy-light/css/legacy-light.scss", "theme-legacy-dark": "./node_modules/matrix-react-sdk/res/themes/legacy-dark/css/legacy-dark.scss", From 1dae7df28a520549d2658b4d09b7e0d832c8e289 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Sat, 10 Oct 2020 19:01:30 +0100 Subject: [PATCH 2/3] added doc for latex_maths feature flag --- docs/labs.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/labs.md b/docs/labs.md index 50f9e589ed..00f9d74cac 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -7,6 +7,10 @@ to `Settings->Labs`. This list is non-exhaustive and subject to change, chat in **Be warned! Labs features are not finalised, they may be fragile, they may change, they may be dropped. Ask in the room if you are unclear about any details here.** +## LaTeX math in messages (`feature_latex_maths`) + +Enables LaTeX math in messages using [KaTeX](https://katex.org/). + ## New spinner design (`feature_new_spinner`) Replaces the old spinner image with a new, svg-based one featuring a sleeker design. From e743a12f30d456fd09fd498f4cc4ff65a3212b18 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Thu, 26 Nov 2020 17:40:14 +0000 Subject: [PATCH 3/3] matched setting name to PR in matrix-react-sdk --- docs/labs.md | 4 ++-- webpack.config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/labs.md b/docs/labs.md index 198d94f4f1..9188de9c74 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -7,9 +7,9 @@ to `Settings->Labs`. This list is non-exhaustive and subject to change, chat in **Be warned! Labs features are not finalised, they may be fragile, they may change, they may be dropped. Ask in the room if you are unclear about any details here.** -## LaTeX math in messages (`feature_latex_maths`) +## Render LaTeX maths in messages (`feature_latex_maths`) -Enables LaTeX math in messages using [KaTeX](https://katex.org/). +Enables rendering of LaTeX maths in messages using [KaTeX](https://katex.org/). LaTeX between single dollar-signs is interpreted as inline maths and double dollar-signs as display maths (i.e. centred on its own line). ## New spinner design (`feature_new_spinner`) diff --git a/webpack.config.js b/webpack.config.js index b61a3e952f..b20f3722a7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -41,7 +41,7 @@ module.exports = (env, argv) => { "jitsi": "./src/vector/jitsi/index.ts", "usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.js", - // CSS for math outout + // CSS for LaTeX maths outout "katex": "./node_modules/matrix-react-sdk/node_modules/katex/dist/katex.min.css", // CSS themes