The quality of javascript as a language is an irrelevance. It could be the most amazing language in the world, but it is still dispensable compared to HTML in the context of the web. That's the bottom line.
LaTeX becoming the new markup language for the web is *completely* different from swapping out a scripting language in favor of a new language to dynamically manipulate DOM.
Not only would it require current browsers to be updated to parse latex markup, but it would also require ALL user agents including search engines and bots to be updated to understand the semantics of this new markup language. It's the same reason XHTML was used as an attempt to move toward XML, rather than using just generic XML as the web language. Generic XML does not have the universal semantics that HTML established for the web and it would be absolutely devastating to try to establish a new set of universal semantics. Neither generic XML, nor LaTeX, nor any other markup language as far as I'm convinced, could handle this burden.
Using LaTeX would also redefine essentially every specification there is. It would replace the HTML spec obviously, and create further dissonance between XML-based languages and the main web markup language. What happens when XBL2 comes out? How would that even work with LaTeX? What about inline SVG? How would it work? It wouldn't.
Swapping out javascript on the other hand wouldn't entail altering ANY specifications at all, anywhere.