12 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
eb335efe8e
DEV: prettier 2.2.1 (#26) 2021-01-27 10:36:08 +01:00
jjaffeux
6367e2b5fb Revert "DEV: enforces no-var (#22)"
This reverts commit eecb13b4868685e7a4112a5e4fbb144fed63170c.
2020-10-13 15:41:08 +02:00
Joffrey JAFFEUX
eecb13b486
DEV: enforces no-var (#22) 2020-10-13 11:36:21 +02:00
Joffrey JAFFEUX
e3068bb476
DEV: apply coding standards (#20) 2020-09-04 13:22:43 +02:00
Robin Ward
08c8a94f7e Remove deprecation 2020-07-06 14:49:01 -04:00
Joe
595fc8675b FIX: don't wrap inline math (#17)
* adds CSS classes for styling

* don't wrap inline-math

* adds comment about selectors
2019-09-10 14:56:59 +10:00
Joe
9615034d78 FEATURE: Responsive equations (#16)
* adds class to math containers for styling
* adds responsive styles
2019-09-09 15:08:01 +10:00
Penar Musaraj
e509c6f6e4 Add id to decorateCooked API call 2019-06-20 10:14:57 -04:00
Penar Musaraj
024ea27fb9 Run Prettier 2019-06-14 13:28:18 -04:00
Penar Musaraj
9810a98d21 One more eslint fix 2019-06-14 12:50:17 -04:00
Penar Musaraj
25a65eacc9 Fix eslint 2019-06-14 12:47:22 -04: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