Avatar

mathjax for tex support (General)

by Auge ⌂ @, Monday, May 14, 2018, 09:37 (66 days ago) @ Milo

Hi Auge,

Deactivating the parsing globally and activating it locally. Looks interesting.

Maybe, there is another (or better) solution but this one works (and, currently, I don't saw another way to avoid conflicts). Maybe, you have another solution?!

No, I haven't.

I prefer to remove the old implementation and switch to mathjax, because mathjax can be host by the forum administrator.

That's generally a step forward (IMHO).

The bbcode_tex can be an URI, e.g. the CDN service of the Javascript files. If we use the simple on-off-switcher, we need another - as you pointed out - option. But what will be done, if the user enable the option but does not provide the URI? Isn't it a redundantly option?

Alternatively, we pre-configure the mathjax. In this case, an on-off-switcher make sense.

Correct, but I for myself do not want to insert new dependencies. More, I want to remove dependencies (in general and where possible). Thatswhy I mentioned highlight.js in another entry. Both cases, code highlightning and TeX-formula-rendering are not common but more exceptional usecases. Recommending libraries and showing the way to insert it in one or two steps is IMHO better than to run afterwards the updates of the external libs.

With a JS-library, included from a CDN, a forum operator is on the actual version of the lib at every moment but she/he has to inform the visitors about shared data (to come back to the GDPR). With a local copy of a JS-library on the other hand, a forum operator will not send data to a third party (except the lib does it on it's own) but she/he has to check for updates every when and then (I know, it won't happen in most cases).

Was it your intention?

My intention was to make the new way possible without removing the old way [1]. That said, my thought was ...

1. ... to switch TeX-support on and off and ...
2. ... to decide, if TeX-formulas get rendered the old way, if an URL is provided, or ...
3. ... the formulas get rendered by MathJax without the URL in the new setting but with an additional <script>-element in the header of the main template. Otherwise a visitor sees the plain TeX-formula surrounded by the BB-code. That would look ugly but is not dangerous.

Tschö, Auge

[1]: Nur, um es klarzustellen. Ich bevorzuge einen vollständigen Umstieg von externen TeX-zu-Bilderdiensten zu einer JS-Bibliothek, die lokal betreibbar ist. Es kann aber Installationen geben, in denen die alte Art, TeX-Formeln zu rendern, benutzt wird. Dort gibt es mindestens auch schon die Cache-Versionen der Postings, die nicht neu erstellt werden, bloß, weil wir eine Funktion umbauen. Die Postings sind dann einfach mal kaputt, wenn der Cache nicht explizit gelöscht wird. Deswegen überlegte ich, wie man den neuen Weg neben den alten Weg stellen könnte, ohne letzteren zu versperren.

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread

powered by my little forum