android/ jqmath

I want to write table(matrix) with jqmath but the output is not correct .
I copy jqmath example .
there is my code :

webView = (WebView) findViewById(R.id.wv);
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);

String path="file:///android_asset/mathscribe/";
String js = "<html><head>"
        + "<link rel='stylesheet' href='"+path+"jqmath-0.4.3.css'>"
        + "<script src='"+path+"jquery-1.4.3.min.js'></script>"
        + "<script src='"+path+"jqmath-etc-0.4.3.min.js' charset=\"utf-8\"></script>"
        + "</head><body>"
        + "<script>var s = '$(\\table \\ cos θ, - \\sin θ; \\sin θ, \\cos θ)$ gives a rotation by $θ$';M.parseMath(s);document.write(s);</script>" 
        + "</body>";
webView.loadDataWithBaseURL("file:///android_asset/mathscribe/", js, "text/html", "UTF-8", null);    

the output is linear matrix like below :

在此处输入图片说明

I suggest that combine slash and t (\\t)in " var s = '$( \\table \\ cos θ, - \\sin θ; \\sin θ, \\cos θ) " cause this problem because the t character is gone and first line moved to right.

How I can solve this problem?

SOlVED if I replace every slash with 4 slash the result is correct ....

I think it's best to replace the line:

        + "<script>var s = '$(\\table \\ cos θ, - \\sin θ; \\sin θ, \\cos θ)$ gives a rotation by $θ$';M.parseMath(s);document.write(s);</script>" +

with:

        + "$(\\table \\cos θ, - \\sin θ; \\sin θ, \\cos θ)$ gives a rotation by $θ$" +

or:

        + "$(`table `cos θ, - `sin θ; `sin θ, `cos θ)$ gives a rotation by $θ$" +

暂无
暂无

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question jqMath does not display equations Using jqMath in Android application jqmath align left in webView android How to use jqMath in Android Studio My jqMath is not formatting \text and \table correctly Using jqMath on Android treating “\t” as an escape character Is it possible to use jqMath in Windows and Iphone mobile app? Can not render tweets Matrix can not be modified How to increase font size of jqMath equation for Android app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM