math equation not showing in mobile chrome properly

1,033 views
Skip to first unread message

13mch...@gmail.com

unread,
Nov 16, 2018, 6:15:27 AM11/16/18
to MathJax Users
hi all friends,
i am facing an issue regarding mathjax. maths equation are properly showing in desktop chrome & all other browsers, but in mobile chrome(only) it shows only latex format, try this link (equations are only used in Q's) in desktop as well as on mobile you will see difference.
this is coding..........thanx in advance for your kind help.

<script>
  $(function() {
  $('.ckeditor').each(function(){  
CKEDITOR.replace($(this).attr('id'), {
extraPlugins: 'mathjax',
height: 250
});
});  
  });  
</script>
<script type="text/x-mathjax-config">
     MathJax.Hub.Config({tex2jax: {inlineMath: [['\\(','\\)']]}});
   </script>
   <script type="text/javascript"
   </script>
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("End Jax",function () {
 var BROWSER = MathJax.Hub.Browser;
 var jax = "CommonHTML";
 //var jax = "HTML-CSS";
 if (BROWSER.isMSIE && BROWSER.hasMathPlayer) jax = "NativeMML";
 if (BROWSER.isFirefox) jax = "OTF";
 if (BROWSER.isSafari && BROWSER.versionAtLeast("5.0")) jax = "NativeMML";
 return MathJax.Hub.setRenderer(jax);
});
</script>

Davide Cervone

unread,
Nov 16, 2018, 5:25:32 PM11/16/18
to mathja...@googlegroups.com
There are several problems with your setup.  First, you seem to be using two different configuration files (one in ckeditor and one in you main page).  Second, on the main page, you are setting the renderer either to CommonHTML or NativeMML, so it would be better to load a configuration that isn't based on HTML-CSS output (like the one you are using).  I would recommend TEX-AMS_CHTML for the main page as well as the ckeditor frame.  Third, for Firefox, you seem to be requesting "OTF" output, but there is no such output processor.  Do you mean for that to be NativeMML for that as well?  Fourth, your MathJax configuration blocks should come BEFORE the script that loads MathJax.js itself (so your second one is misplaced).  Fifth, the configuration for tex2jax is the default, so there is no need for the configuration script at all (unless ckeditor's copy of MathJax is also in the main page and is being configured differently and you are trying to override that -- I didn't check to see if the were the case).

None of these is actually the problem you are having, however.  The issue in this case is that MathJax is not detecting mobile Chrome properly and is thinking it is Safari.  Since you are changing of NativeMML for Safari, that means mobile Chrome is being set to use NativeMML, but Chrome doesn't support MathML, that means the math isn't being displayed properly.

MathJax is actually detecting both Safari and Chrome, so one possible solution would be to use

if (BROWSER.isSafari && !BROWSER.isChrome && BROWSER.versionAtLeast("5.0")) jax = "NativeMML";

until the detection is fixed.

Davide


--
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.

mukesh chauhan

unread,
Nov 16, 2018, 11:37:51 PM11/16/18
to mathja...@googlegroups.com
Thanx dear for your kind help, problem solved.
How to make this code proper as you guided.

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/I0WH170IwO4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages