JavaScript libraries, loading and using (Latex / Katex fromat)

55 views
Skip to first unread message

Алексей Данчин

unread,
Apr 21, 2017, 5:16:25 AM4/21/17
to DroidScript
I want to write a small HTML-app-directory with integrals and differentials. With this goal needed add files https://github.com/Khan/KaTeX and https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX.

Create files, copy and save. Load:

    function OnStart(){
        app
.LoadScript("katex.min.js", function () {
            app
.LoadScript("katex-autorender.js", function () {
                renderMathInElement
(document.body);
           
});
       
});
   
}

1) Can I load scripts through just: ?

<script src="file:///katex.min.js"></script>

2) Scripts loadded, but when I try 
renderMathInElement(document.body)
catched error
Script Error: Failed to parse `c = \\pm\\sqrt{a^2 + b^2}` with , Line 1, katex-autorender.js

But 
`c = \\pm\\sqrt{a^2 + b^2}` - it's copy example from site.

3) Where can I see file hierarchy?

4) Can I edit code more than just in browser, but with live app-reloading? ))

5) When I write HTML app - is it simulator of browser? If so, what browser used?

-- Sorry for the level of English
Reply all
Reply to author
Forward
0 new messages