Math Processing Error in WebView on an Android App

487 views
Skip to first unread message

42hrs in

unread,
Aug 7, 2015, 5:39:24 AM8/7/15
to mathja...@googlegroups.com
Hi,

We're working on an Android app which renders Latex in a Webview using Mathjax (packaged locally). It renders the math properly, but after 30-40 seconds the math is replace with "Math Processing Error".

I then put the files up on a server and opened the link inside a webview and a chrome tab. It works fine in chrome, but the webview started throwing "Math Processing Errors" after a while.

Have any of you encountered this issue? I'd appreciate if someone could shed some light on why this might be happening.

Thank you

Peter Krautzberger

unread,
Aug 7, 2015, 7:32:09 AM8/7/15
to mathja...@googlegroups.com
Hi,

There's really not much to go on. Could be anything from missing components to a bad configuration to a bug. You might want to try providing more details on your setup.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Farmer

unread,
Aug 7, 2015, 9:50:56 AM8/7/15
to mathja...@googlegroups.com

"Math Processing Error" can be caused by several things, one
of which is an infinite loop in a macro expansion.

Can you provide an example so we can reproduce the error?

42hr...@gmail.com

unread,
Oct 6, 2015, 1:51:47 AM10/6/15
to MathJax Users
This is my configuration:

    <script type="text/javascript" src="js/mathjax/MathJax.js" ></script> 
    <script type="text/javascript">
        MathJax.Hub.Config({
          jax: ["input/TeX","output/HTML-CSS", "output/CommonHTML"],
          extensions: ["tex2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.js"],
          TeX: {
            extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
          }
        });
    </script>

The Math renders properly and can be seen for 30-40 seconds, before the Math Processing Error is shown.

Thanks 

ma...@solanomorales.com

unread,
Jul 18, 2016, 6:28:17 PM7/18/16
to MathJax Users, 42hr...@gmail.com
Hi, did you ever get this working? I'm facing right now the same problem. I'm developing an android app and loading mathjax locally. Firstly everything is rendered ok, but after few seconds the content is replaced by [Math Processing Error].

Regards, Solano

Peter Krautzberger

unread,
Jul 19, 2016, 5:48:20 AM7/19/16
to mathja...@googlegroups.com, 42hrs in
Hi Solano,

A long delay usually indicates that MathJax timed out while loading its components. A wild guess would be that, the first rendering was just the Fast Preview mode (which is fast but rough) and then the full-quality rendering was the one that failed (and unless there's a lot of math in the document, the delay indicates MathJax timing out). 

Again, without more background information that's hard to say. It might also be better to post to a forum with more Android expertise like StackOveflow.

Regards,
Peter.

On Tue, Jul 19, 2016 at 12:28 AM, <ma...@solanomorales.com> wrote:
Hi, did you ever get this working? I'm facing right now the same problem. I'm developing an android app and loading mathjax locally. Firstly everything is rendered ok, but after few seconds the content is replaced by [Math Processing Error].

Regards, Solano

--

Solano Morales

unread,
Jul 19, 2016, 9:57:08 AM7/19/16
to mathja...@googlegroups.com, 42hrs in
Thank you Peter for your response and advice. 
I figured out, that when I set imageFont = null, the error goes away, but the math isn’t rendered correctly. So, I think it has something to do with the image fonts. I will post this on StackOverflow.

Thank you very much again,
Solano

You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/JzxroawntWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.

Davide Cervone

unread,
Jul 19, 2016, 10:43:49 AM7/19/16
to mathja...@googlegroups.com
If MathJax is trying to load image fonts, then that means it was not able to load the web fonts.  Make sure you have included them in your local copy of MathJax.  If they are there, check that they can actually be loaded by making a test file that uses @font-face to access one of them.  If you are using the Gecko engine in your app, for example, its same-origin security policy may be preventing them from being loaded.

If they are able to be loaded, then it could be that MathJax is not able to detect them.  But in that case, after the delay, the math would by typeset properly, so I suspect it is either that you didn’t include the fonts in your app, or that they aren’t able to be loaded.

Davide

Solano Morales

unread,
Jul 19, 2016, 3:10:17 PM7/19/16
to mathja...@googlegroups.com
I found the problem. I was using the files within the ‘unpacked’ folder and there isn’t a font folder. This was the reason why the processing it failed after a while. Putting the fonts folder to its place solved my issue. 

Thank you very much for you help!

Solano
Reply all
Reply to author
Forward
0 new messages