making mathjax typeset on request from my code

26 views
Skip to first unread message

ly...@lynges.net

unread,
Feb 23, 2015, 3:13:25 PM2/23/15
to mathja...@googlegroups.com
Hi.
I have been reading the docs, but nothing popped out as the thing I am looking for. It might be there, but I simply not found it.

I would like to load mathjax on a page and have it do absolutely nothing.

Then my own code iterates some elements that have math (and only math) in them. I would then like to be able to tell mathjax that this one element I am looking at right now contains for example asciimath and it is inline, please typeset this and make it look awesome.

How would I best go about doing that?

Thanks in advance.

Murray

unread,
Feb 24, 2015, 7:03:08 AM2/24/15
to mathja...@googlegroups.com, ly...@lynges.net
Hi

You could use this in your configuration to stop MathJax from processing on page load:

skipStartupTypeset: true


Then after you have added your bits of math, you could use the process explained on this page to process them:


See especially the example at the bottom

If it is ASCIIMath input, just use the appropriate config setting when calling MathJax:


Hope it helps

Regards
Murray

ly...@lynges.net

unread,
Mar 16, 2015, 4:24:53 PM3/16/15
to mathja...@googlegroups.com, ly...@lynges.net
Thanks for the input. Got away from the project for a bit. Could'nt quite make your suggestion work, but I found something that is probably more appropriate.

It is mentioned here:

That one could just create those <script> tags and have MathJax do its thing as usual. It kinda works.

I would like to have my math rendered within <math> elements, but MathJax refuses to work with these. I guess someone thought that since it is reserved for MathML it should not be used. Maybe they are right, but I would like to turn this off and have the outermost element of the rendered math be a <math> element that I specify, but I can work around it so don't sweat it.

A much bigger problem is that for some reason MathJax will not create the <div class="MathJax_Display"></div> when I tell it to use mode="display" it still creates inline spans and nothing is centered. Any ideas as to why this is? This is of course not when using <math> elements as they produce nothing at all.

Many thanks for any input as I have been pulling my hair over this for a couple of hours now.
Reply all
Reply to author
Forward
0 new messages