Commit Graph

5 Commits

Author SHA1 Message Date
qnxor abe2daf0f3
katex: copy-paste support for Latex code, upgraded to katex 0.16.0 (#54) 2022-11-16 14:39:48 -05:00
qnxor 4b4ad9d532
FEAT: enable persistent macros in Katex, update Katex to 0.15.6 (#51) 2022-06-07 11:19:59 -04:00
qnxor 7051bbbb2d
update katex to latest version 2022-02-25 09:10:37 +11:00
Daniel Hollas 03ec5c0443 FEATURE: Update KaTeX renderer to v0.11.1 (#18)
Mostly bug fixes and couple new features.
This version is now live on khanacademy.org
2019-12-04 17:32:31 +11:00
Daniel Hollas dce1a1b0a1 FEATURE: Add KaTeX rendering support (#15)
* FEATURE: Add KaTeX in-browser rendering support.

* Remove ttf fonts from KaTeX

* Update KaTeX to v0.10.1, fix paths to fonts.

Font loading was fixed by rebuilding KaTeX
and specifiying absolute paths to fonts in CSS:
Steps to build KaTeX:

1. `git clone https://github.com/KaTeX/KaTeX.git && cd KaTeX`
    `git submodule update --init --recursive`

2. Change paths to fonts:
    `sed -ri 's/@font-folder.+$/@font-folder:
"\/plugins\/discourse-math\/katex\/fonts";/'
submodules/katex-fonts/fonts.less`

3. Disable TTF fonts:
   `export USE_TTF=false`
    Alternatively, we could modify `.browserslistrc` to match what
Discourse supports

3. Build KaTeX
   `yarn && yarn builld`

4. Copy `katex.min.js` and `katex.min.css` from `dist/` to
`discourse-math/public/katex/`

5. Update fonts, copy woff and woff2 files from
`submodules/katex-fonts/fonts`

* Minor copy edit to settings

Mark MathKJax only settings

* Add Mhchem extension for KaTeX.

It is already automatically loaded for MathJaX.
2019-03-05 07:35:00 +11:00