Mathjax and Angular - the step by step example

2,087 views
Skip to first unread message

Jeff W

unread,
Sep 15, 2015, 2:14:59 AM9/15/15
to MathJax Users
Hi everybody,

I am new to both, angular and mathjax an i have been trying to figure out how the "dynamic equations in mathjax" could be realized the angular way.


To show the solution one step at a time is a really good way to explain how to solve the equation, because the students can concentrate on the current step.

i tried it the way that i have a placholder in the html {{ mathjaxContent }} for the mathjax string that changes on every step forward. The Problem here is that Mathjax will rerender all the content especially when i use "\align".

Does anybody has an idea ho i can get mathjax to render all the content at the beginning for a proper placement but switch the different steps to "visible" one at a time.

Thanks a lot,

Jeff

rf...@pima.edu

unread,
Oct 1, 2015, 3:58:03 PM10/1/15
to MathJax Users
I hope you get a response on this one - what you are working on looks nice. Just curious how it would work with a screenreader. 

Robert

pipa...@gmail.com

unread,
Oct 1, 2015, 5:06:54 PM10/1/15
to mathja...@googlegroups.com
Hi,

thanks for the comment,
asfar as i know mathjax is compatible with screenreaders if you respectsome rules.
Greetings
Jeff

Von meinem Android-Gerät rgesendet.
--
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/HQcuk8xTGLk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Krautzberger

unread,
Oct 2, 2015, 3:29:18 AM10/2/15
to mathja...@googlegroups.com
Hi Jeff,

The Problem here is that Mathjax will rerender all the content especially when i use "\align".

It's note quite clear what you mean by that.

Can you share a live demo (jsbin, codepen etc) that shows what you've tried?

Regards,
Peter.

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

Sonya Woods

unread,
Oct 3, 2015, 8:22:36 AM10/3/15
to MathJax Users
Jeff,
I really like how this works and I was also curious how it would work with a screenreader. Using JAWS 16 in IE 11, JAWS reads the math but for every part of the equation, JAWS says "clickable on mouse-over" which is a bit annoying. I could activate the "Show Next Step" button and the new content appeared visually but there is no audio indicator of the state change. If there is a chance a person who is completely blind will read your content, then you might want to put the a link to a non-dynamic version for them.

Jeff W

unread,
Oct 5, 2015, 5:49:39 AM10/5/15
to MathJax Users
Hi everybody,

I updated my fiddle to better explain what i am trying to do.

In a nutshell: All i want to do is find an angular way of showing an equation one step at a time within an align environnment since it renders the mat the best way. when a new step is shown the should not be an insertion of elements into the DOM.
please visit http://jsfiddle.net/pipapongo/qbt9Lrbe/ there are more explanations

thank a lot

Murray

unread,
Oct 8, 2015, 11:36:45 PM10/8/15
to MathJax Users
Hi Jeff

I've got something that almost works for you.


If anyone can get the hiding behavior sorted out, then I believe it's viable for your situation.

Hope it helps.

Regards
Murray

pipapongo

unread,
Oct 9, 2015, 2:17:54 AM10/9/15
to mathja...@googlegroups.com
Hi Murray,

Thanks a lot for the reply, i will look into it and try to replicate it.

jeff
--
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/HQcuk8xTGLk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.

Jeff W

unread,
Oct 29, 2015, 10:46:20 AM10/29/15
to MathJax Users
Hi,
 I updated my example and it should work now.
The Problem i am facing is that all steps of the equations a repeated when i do it with angular, i do not understand what is going on
https://jsfiddle.net/pipapongo/6j3kyhpc/

thanks a lot

To unsubscribe from this group and all its topics, send an email to mathjax-users+unsubscribe@googlegroups.com.

rober...@gmail.com

unread,
Oct 29, 2015, 2:26:37 PM10/29/15
to MathJax Users
I hope you don't mind me asking, but where can I find information about respecting some rules and screenreader Jaws. We have a student that is having issues as JAWS keeps reading "clickable on mouseover" and states they are getting gibberish. I redid my calc notes for this students using MathML and Mathjax - any advice is appreciated.

Robert

Peter Krautzberger

unread,
Oct 29, 2015, 2:35:27 PM10/29/15
to mathja...@googlegroups.com

Hi Robert,

You should try out the 2.6 which is in public beta and ships with a new extension to improve screen reader support. From our tests JAWS works much better now.

The 'clickable' is still there (depending on the browser) because of the MathJax menu which provides several features, including the zoom which is an important accessibility features for sighted users. On the bright side, the menu is now fully accessible as well.

Let us know how it goes.

Regards,
Peter.

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.

Foth, Robert

unread,
Oct 29, 2015, 2:37:36 PM10/29/15
to MathJax Users
Thanks ... I saw the documentation posted https://media.readthedocs.org/pdf/mathjax/v2.6-latest/mathjax.pdf but couldn't find out if the new cdn switched over to 2.6 or not. Is there a timeline when 2.6 is being pushed out ... I can't seem to find it. 

Peter Krautzberger

unread,
Oct 29, 2015, 2:40:54 PM10/29/15
to mathja...@googlegroups.com

You can use beta.mathjax.org/mathjax/latest for the beta.

We don't have a fixed ETA yet as we want to give the new output a wider test later this month.

Peter.

Foth, Robert

unread,
Oct 29, 2015, 2:44:34 PM10/29/15
to MathJax Users
Thanks - I will set up some test pages for the students with that to see if it helps. 

Peter Krautzberger

unread,
Oct 29, 2015, 2:48:51 PM10/29/15
to mathja...@googlegroups.com

Great! We'd love more feedback.

There is always http://beta.mathjax.org/mathjax/latest/test/examples.html for a quick start.

Peter.

Foth, Robert

unread,
Oct 29, 2015, 2:52:09 PM10/29/15
to MathJax Users
I have stuff embedded in these tabs that we want to test out as well ... examples on the page: http://cc.pima.edu/~rfoth/MAT220/Course%20Notes/Module5/Module5-5/Module5-5.html 

 

Peter Krautzberger

unread,
Oct 29, 2015, 5:39:53 PM10/29/15
to mathja...@googlegroups.com
Hi Jeff,

I'm afraid I don't know Angular but from a quick search I found https://jsfiddle.net/austinkeeley/2fMsL/ so I made https://jsfiddle.net/y3c4r5en/ which may or may not be helpful. Keep in mind that I really don't know what I'm doing ;-)

You might also want to look at http://docs.mathjax.org/en/latest/typeset.html#manipulating-individual-math-elements, in particular Text() and needsUpdate(), i.e., try to create a single custom script tag and update its content rather than creating new elements. Alternatively, you could try to create detached DOM nodes for each equation, typeset them as detached node, and cycle through that. There's a small risk that CSS might interfere but in your example design this should work fine.

Best wishes,
Peter.


thanks a lot


To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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.
Reply all
Reply to author
Forward
0 new messages