Skip to content

old LFAQ less frequently asked questions

pkra edited this page Apr 5, 2013 · 1 revision

Moved here from https://github.com/mathjax/MathJax/wiki/LFAQ----less-frequently-asked-questions

LFAQ less frequently asked questions

The MathJax FAQ <http://www.mathjax.org/resources/faqs/>_ answers many basic questions about MathJax.

The MathJax User Group <http://groups.google.com/group/mathjax-users/>_ is the right place to ask further questions.

On this page we collect some of useful threads from the Mathjax User Group.

WARNING Use at your own risk!

Some (but not all) solutions below involve hacks and use undocumented features of MathJax. We give no guarantee that such hacks will work in future versions of MathJax. If you're uncertain about this, ask us on the User Group.

.. contents::

Can I use MathJax with my Javascript program?

Yes, but MathJax performs much of its activity asynchronously so be sure to synchronize your code with MathJax <http://www.mathjax.org/docs/2.0/synchronize.html>. See also these examples <http://cdn.mathjax.org/mathjax/latest/test/examples.html>

Can I access the MathML code generated from a formula in a programmatic way through javascript?

Yes, see this thread <https://groups.google.com/forum/#!msg/mathjax-users/unL8IjcrTto/DjHpH4BbPRcJ>_ for an example, but again keep in mind that MathJax performs much its activity asynchronoulsy.

I modified/created a formula using Javascript but it is not displayed correctly by MathJax. Why?

MathJax processes the formulas when the page is loaded but you must ask MathJax to reprocess the formulas that are modified/created later. See Modifying Math on the Page <http://www.mathjax.org/docs/1.1/typeset.html>_ See also these examples <http://cdn.mathjax.org/mathjax/latest/test/examples.html>_

How can I configure a local fallback for the CDN?

You might want to read this thread <http://groups.google.com/group/mathjax-users/browse_thread/thread/e9ef3ce9124c2a17/9da9e49d84039fe2?lnk=gst&q=+Local+fallback+for+MathJax+CDN#9da9e49d84039fe2>_

::

 <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script> 
 <script>window.MathJax || document.write('<script type="text/x-mathjax-config">MathJax.Hub.Config({"HTML-CSS":{imageFont:null }});<\/script>
 <script src="<<PATH_TO_YOUR_LOCAL_MATHJAX>>MathJax.js?config=TeX-AMS_HTML-full"><\/ script>')</script> 

Are there any fundamental differences between MathJax TeX input and TeX/LaTeX?

There aren't many, but here's one discussion <https://groups.google.com/forum/#!msg/mathjax-users/aCj-qkCp3hY/nxd56AUC7coJ>_ .

Examples:

  • \sqrt\frac{3}{4} doesn't work. Enclosing the argument in curly braces works \sqrt{\frac{3}{4}}
  • \hat \mathbf u works in article, not in amsart (or MathJax) -- \hat{\mathbf u} works in amsart and MathJax.

How do I show MathJax menu on double-click?

Here's a thread discussing it <http://groups.google.com/group/mathjax-users/browse_thread/thread/cd9806f1fd33310e/e4a9dfc673e48264>_ and here's code <https://github.com/ppurka/sagenb/blob/235e4869a8cccebf527306320a3a72ff98f46cab/sagenb/data/sage/js/DoubleClickEvent.js>_ that might help you get started.

How do I re-size text when the browser falls back to image fonts?

See this thread <http://groups.google.com/group/mathjax-users/browse_thread/thread/d80ae6ba62a9ae84/7197bb1868c4ae68>_ but note that there are very few reasons why your browser might fall back to image fonts for rendering -- be sure to check the FAQ <http://www.mathjax.org/resources/faqs/#image-fonts>_

Can I embed equations in SVG and have them rendered by MathJax?

See this thread <https://groups.google.com/forum/#!topic/mathjax-users/_UMt3C7TIpQ/discussion>_ for an example that works in Firefox, Safari and Chrome.

Can MathJax use [enter your favorite font] to render mathematics?

MathJax currently only supports STIX and our own webfonts (which are based on TeX Computer Modern and AMS fonts). For the technical reasons, see this thread <https://groups.google.com/d/msg/mathjax-users/XVrMF_S44UE/wmm5_gil8BwJ>. For unsupported hacks, see this thread <https://groups.google.com/forum/#!topic/mathjax-users/PjcC7lqbNGs/discussion>, and even more information at this tread <https://groups.google.com/d/topic/mathjax-users/LsC-31yuDpg/discussion>_.

How do I print a page after MathJax rendering is complete?

From this thread <https://groups.google.com/d/msg/mathjax-users/_vTqHlpRED8/VuglIdf0C0cJ>_ you get

::

 <script type="text/x-mathjax-config"> 
   MathJax.Hub.Queue( 
   ["Remove",MathJax.Message], 
   print 
   ); 
 </script> 

You should probably switch to SVG rendering on your print-page (see the discussion on the thread).

How can I work around the Firefox printing bug?

See this thread <https://groups.google.com/d/topic/mathjax-users/9mtaQae1WJg/discussion>_.

Why doesn't a TeX command like \. {a} work in MathJax? How do I enter international symbols?

MathJax only strives to implement math-mode macros of TeX, not text-mode. But see this thread <https://groups.google.com/d/topic/mathjax-users/Pzq6Sf69IDI/discussion>_ for more information

Can I get mouse clicks from rendered MathJax?

See `this thread https://groups.google.com/d/msg/mathjax-users/-8FaQfp5Dz8/VX83KTSu-1kJ'_ for further reading material.

How can I disable MathZoom.js and MathMenu.js?

See this thread <https://groups.google.com/d/topic/mathjax-users/_HCDxJbCFjc/discussion>_ -- but this won't improve rendering speed.

Why is MathJax waiting 15 seconds before rendering my site?

MathJax waits 15 seconds for resources to load. Often this is caused by an error in custom configurations, see this thread <https://groups.google.com/d/topic/mathjax-users/LFXTIz4RmvA/discussion>_.

How do I shrink MathJax for "local" installation?

See Shrinking-MathJax-for-"local"-installation.

Clone this wiki locally