마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 mathjax statusbar 제거 질문입니다.

0 추천
w.loadDataWithBaseURL("http://bar/", "<script type='text/x-mathjax-config'>"
        + "MathJax.Hub.Config({ "
        + "jax: ['input/TeX','output/HTML-CSS'], " // output/SVG
        + "extensions: ['tex2jax.js','toMathML.js'], "
        + "TeX: { extensions: ['AMSmath.js','AMSsymbols.js',"
        + "'noErrors.js','noUndefined.js'] }, "
        //+"'SVG' : { blacker: 30, "
        //+"styles: { path: { 'shape-rendering': 'crispEdges' } } } "
        + "});</script>"
        + "<script type='text/javascript' "
        + "src='file:///android_asset/MathJax/MathJax.js'"
        + "></script>"
        + "<script type='text/javascript'>getLiteralMML = function() {"
        + "math=MathJax.Hub.getAllJax('math')[0];"
        // below, toMathML() rerurns literal MathML string
        + "mml=math.root.toMathML(''); return mml;"
        + "}; getEscapedMML = function() {"
        + "math=MathJax.Hub.getAllJax('math')[0];"
        // below, toMathMLquote() applies &-escaping to MathML string input
        + "mml=math.root.toMathMLquote(getLiteralMML()); return mml;}"
        + "</script>"
        + "<span id='math' style='display:flex;'></span><pre><span id='mmlout'></span></pre>", "text/html", "utf-8", "");

웹뷰에서 mathjax를 보여주는 어플입니다. 하단에 이렇게 스테이터스바가 나오는데 하단에 나타나는 status bar 를 지우기 위해

 

w.loadDataWithBaseURL("http://bar/", "<script type='text/x-mathjax-config'>"
        + "MathJax.Hub.Config({ "
        + "messageStyle: none," +
        "  tex2jax: {preview: none},"
        + "jax: ['input/TeX','output/HTML-CSS'], " // output/SVG
        + "extensions: ['tex2jax.js','toMathML.js'], "
        + "TeX: { extensions: ['AMSmath.js','AMSsymbols.js',"
        + "'noErrors.js','noUndefined.js'] }, "
        //+"'SVG' : { blacker: 30, "
        //+"styles: { path: { 'shape-rendering': 'crispEdges' } } } "
        + "});</script>"
        + "<script type='text/javascript' "
        + "src='file:///android_asset/MathJax/MathJax.js'"
        + "></script>"
        + "<script type='text/javascript'>getLiteralMML = function() {"
        + "math=MathJax.Hub.getAllJax('math')[0];"
        // below, toMathML() rerurns literal MathML string
        + "mml=math.root.toMathML(''); return mml;"
        + "}; getEscapedMML = function() {"
        + "math=MathJax.Hub.getAllJax('math')[0];"
        // below, toMathMLquote() applies &-escaping to MathML string input
        + "mml=math.root.toMathMLquote(getLiteralMML()); return mml;}"
        + "</script>"
        + "<span id='math' style='display:flex;'></span><pre><span id='mmlout'></span></pre>", "text/html", "utf-8", "");

와같이 이부분을 추가 했는데 

+ "messageStyle: \"none\"," +
"  tex2jax: {preview: \"none\"},"

 

 

이렇게 라텍스가 아예렌더링이 되지않네요. 

https://github.com/mathjax/mathjax-docs/wiki/Hide-render-statusbar

여기에 있는 mathjax깃허브의 내용을 그대로 입력한 것입니다. 이것때문에 미치겠네요

 

tims980 (140 포인트) 님이 2018년 3월 8일 질문
tims980님이 2018년 3월 9일 수정
"  tex2jax: {preview: none}" 여기 뒤에 , 가 빠진듯?
넣어도 같은결과네요 ㅠ

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...