3 ms·
IMHO the author of this article needs to find out about MathJax (free BTW) -- it would have spared him those laborious math-related graphic image insertions as
by lutusp 10y ago
IMHO the author of this article needs to find out about MathJax (free BTW) -- it would have spared him those laborious math-related graphic image insertions as well as their contrast with the page background, and look better besides.
MathJax example page: http://arachnoid.com/NormalDistribution http://arachnoid.com/NormalDistribution
- stymaar 10y agoMathjax is indeed a great tool, but I don't think one can add a custom JavaScript library to a wikia page because it would be a massive XSS vulnerability.
- lutusp 10y ago> ... it would be a massive XSS vulnerability. Yes, if the MathJax library were to be accessed remotely. This issue is finessed by having a local copy of the library. Since it's free, many sites host it locally (including mine). But others including Reddit, which IMHO really needs this library also, won't host it, I think on the basis that it isn't used by enough people to justify linking it on every page. So there are definitely arguments against. Ideally it would be a selectable option on a page-by-page basis.
- andreareina 10y agoIs there an option for lazy loading? i.e., a lightwieght script that looks for delimited text and pulls in the rest of the library if needed?
- lutusp 10y ago> Is there an option for lazy loading? I believe Apache can run user-defined scripts to perform this sort of thing -- in this case, look at a page's content and decide how to proceed. But high-volume sites don't like such things because it dramatically slows page loading.
- andreareina 10y agoI was thinking client-side: <script>if (document.body.innerHTML.match(...)) {load_script(https://...)}</script>
- spacehunt 10y agoWhy do you think it's labourious? It's just LaTeX -- see the source code for that page. They just need to adjust the generated PNGs to have a transparent background.
- lutusp 10y ago> Why do you think it's labourious? It's just LaTeX -- see the source code for that page. I wouldn't say "just LaTex", not in the way I mean when I use MathJax, in which case one can insert normal LaTeX in plain-text form, such as \begin{equation} (equation) \end{equation}, or $$(equation)$$, without requiring the use of special tags. > They just need to adjust the generated PNGs to have a transparent background. Yes, but apart from that they render rather badly and don't scale. But I know there are good arguments against loading a math processor for the possibility that there might be mathematical content in someone's page.