Opened 11 years ago
Closed 9 years ago
#2490 closed enhancement (fixed)
Support for modelica:// URIs for scripts in HTML
Reported by: | Dietmar Winkler | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.1 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
For some time now OMEdit supports MathJax, which is great. Now today I had to add this comment to the Modelica tracker. This lead me to play around with MathJax in my library again. Wouldn't it be great if we could load MathJax.js
from a local URI to make the documentation of the library independent of online resources?
Example, instead of writing
<html> <script type=\"text/javascript\" src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"> </script> $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ </html>
I would download and store the MathJax.js
file locally and then use it like:
<html> <script type=\"text/javascript\" src=\"modelica://MyLib/Resources/Scripts/MathJax.js?config=TeX-AMS-MML_HTMLorMML\" </script> $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ </html>
which means I can ship my library with a MathJax version I know works and don't depend on network connections.
Another step would then be to be able to enable the MathJax rendering globally without having to add the <script>...</script>
part into every Modelica file. Could well be a configuration in OMEdit but I would actually prefer to specify it in my Library instead.
Change History (8)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
Description: | modified (diff) |
---|
comment:3 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 by , 11 years ago
Oh, just remember to put your local mathjax on a diet as the library is huge if you include everything. https://groups.google.com/forum/#!topic/mathjax-users/7lzyzXMw5ek
comment:6 by , 11 years ago
Excellent an especially thanks for the link as I was also recently worried about MathJax huge size.
comment:7 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Seems to have been broken again as part of #3311.
comment:8 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fixed again in c6988d4/OMEdit.
Fixed in r18682 (have a look; it was not very hard) :)