Hello, CodeForces!
I've been wondering for a long time, how CodeForces and Polygon convert LaTeX to HTML? What utils does it use? MikeMirzayanov, geranazavr555, could you share it with us?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Hello, CodeForces!
I've been wondering for a long time, how CodeForces and Polygon convert LaTeX to HTML? What utils does it use? MikeMirzayanov, geranazavr555, could you share it with us?
Название |
---|
(I'm not CodeForces staff, but I know a lot about web publishing.)
Most of the web uses KaTeX. Those who hasn't switched to it use MathJax, it's older and slightly slower alternative — including CodeForces (by the way, if some black-colored handles are reading this, please consider upgrading: it is a drop-in replacement that will make a sizeable portion of pages load 2x faster). They both work by including an autoloading script and wrapping all the math formulas with dollar signs, and then JavaScript does its magic.
You could in theory do server-side math rendering, and this is probably how it should be done to optimize both page size and client performance, but I've never seen anyone implementing this — perhaps because the intersection of JavaScript developers and heavy TeX users is too narrow.
If what you really ask is how to put something written in LaTeX on the web, pandoc is generally enough for most use cases.