Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

#67 in-line config -> HTML5 nonconformance

open-later
nobody
5
2010-07-27
2010-07-18
Dean Brettle
No

I just stumbled across the following in the HTML5 spec (http://www.whatwg.org/specs/web-apps/current-work/multipage/introduction.html#design-notes):

<blockquote>
Errors that waste authoring time

Some constructs are disallowed because historically they have been the cause of a lot of wasted authoring time, and by encouraging authors to avoid making them, authors can save time in future efforts.

For example, a script element's src attribute causes the element's contents to be ignored. However, this isn't obvious, especially if the element's contents appear to be executable script — which can lead to authors spending a lot of time trying to debug the inline script without realising that it is not executing. To reduce this problem, this specification makes it non-conforming to have executable script in a script element when the src attribute is present. This means that authors who are validating their documents are less likely to waste time with this kind of mistake.

</blockquote>

I realize there it is possible to config via MathJax/config/MathJax.js, but it would be nice if there were a conformant way to do in-line config. Perhaps something like:

<script type="text/javascript" src="/MathJax/MathJax.js?configPending=true"></script>
<script>
MathJax.Hub.Config({
extensions: ["tex2jax.js","TeX/noErrors.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [['$','$'],["\$","\$"]]},
"HTML-CSS": {availableFonts:["TeX"]}
});
</script>

Discussion

• labels: 1459315 --> Programmer interface
• status: open --> open-later

• Dean:

Thanks for the pointer to this information. It is too bad that HTML5 has made this decision, in my opinion. I rather liked the in-line configuration approach that is used in MathJax, but, as you point out, there are other possible ways to accomplish that. I will work on a method to handle this (something along the lines of your suggestion), but it won't be in time for the 1.0 release. It will come in a future version.

Davide