Avatar

mathjax for tex support (General)

by Auge ⌂, Tuesday, May 15, 2018, 08:54 (2145 days ago) @ Micha

Hello

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.


Thus, the admin can not configure the CDN in the setting area?

This was only a first thought.

One can enable the option "Yes I want TeX support" but nothing will happen, because the CDN must set manually in main template? What is the benefit of the enable/disable option?

As said, it was only a first thought and not a ready-to-use-solution. The benefit of the on-off-switch in itself would be a unification of the behaviour with all the other bbcode-settings, which are on-off-switches with only this one exception.

Currently, the TEX-Code is transformed to an image. If MathJax is used, we need a tag like span or div (to restrict the scope of MathJax). How do we switch between both modes?

That's the question. With only a URL we can't decide, to take the old or the new way. With an on-off-switch and a URL we have the same problem. Thatswhy my first thought was to distinguish between TeX-support off, TeX-support on with only the bbcode_tex (with external include of the JS-lib in the template) as the new way and TeX-support on with the bbcode_tex and an provided URL for the old way. I know, this is not very convinient for every one of the few affected operators but it prevents the introduction of (at least) a third setting.

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.


Dann wäre unsere Caching Funktion aber kaputt. Ich meine, die Cache-Version beinhaltet den vollständigen HTML-Code mit allen Tags ergo auch das generierte Bild (also die URL) von Goople-Chart für die Gleichungen. Wenn der Cache nicht gelöscht wird, werden bei diesen Postings einfach alle "Bilder" angezeigt wie bisher. Erst wenn er gelöscht wird, ist dies anders. Oder missinterpretiere ich unseren Cache?

Nein, tust nicht du, sondern bis eben ich. Ich dachte, es ginge bei dieser Funktion in den Einstellungen um den Inhalt des Verzeichnisses templates_c, aber es geht, wie du richtig sagtest, um die Caching-Tabellen in der Datenbank, in denen die vorgerenderten HTML-Ausgaben der Postings gespeichert werden. Den Cache kann man selbstredend auch bei einem Update löschen, wenn es nötig werden sollte.

Tschö, Auge

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


Complete thread:

 RSS Feed of thread