Using \pause like in Beamer

25 views
Skip to first unread message

Andrew Murdza

unread,
Oct 16, 2022, 3:05:55 PM10/16/22
to MathJax Users
I am looking to use \pause in Mathjax like in Beamer where the user hitting the v causes the next set of text to be revealed

I hired someone to do it using <span class='invisible'> and Javascript but you cannot use <span> inside of Mathjax.

One option is to do $$2x+4=0$$\pause $$2x=-4$$ instead of  $$2x+4=0\pause \\ 2x=-4$$  but then I can't align the equal signs or do stuff like arrays.

Is there a way to do \pause inside of Mathjax?

Andrew Murdza

unread,
Oct 28, 2022, 5:45:38 PM10/28/22
to MathJax Users
Another issue is that using $$x=$$\pause$$1$$ doesn't work if you want a pause inside of displaymath (it becomes two different lines)

Davide Cervone

unread,
Oct 30, 2022, 7:55:34 AM10/30/22
to mathja...@googlegroups.com
MathJax don't have a \pause macro, but it does have a \toggle macro that you can use to change the math that is being displayed.  See


for some examples of how this works.  Press space to reveal the set of the slide, and use the MathJax contextual menu to view the TeX code used.  The right-facing triangle at the bottom right goes on to the net page for more.

For example,

\toggle
{2x+4=0}
{2x+4=0\\
2x = -4}
{2x+4=0\\
2x = -4\\
x = -2}
\endtoggle

could be used to display the successive lines of solving this equation.  But it dead mean you have to repeat the earlier material in each expression.

An alternative is to use some javascript to reveal the successive steps, as in


Go on to the second page to see the javascript that controls it.

Perhaps one of those will give you what you need.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/a575b401-6b80-4455-a32f-4e9c491f23e1n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages