Support for fragments or equivalents with latex equations in revealjs presentations #3224
Replies: 3 comments 23 replies
-
|
Does https://mathjax.github.io/MathJax-demos-web/toggle-steps.html.html https://www.math.union.edu/~dpvc/talks/2013-01-11.jmm/tex-toggle.html I don't think Quarto's MathJax currently supports this, but it might be an easy way to integrate this. |
Beta Was this translation helpful? Give feedback.
-
|
After lots of fiddling and great help from @mcanouil, I found a very easy solution: Just add the $$
\begin{align}
(x+1)^2
&= \class{fragment}{(x+1)(x+1)} \\[3px]
&\class{fragment}{{} = x(x+1) + 1(x+1)} \\[3px]
&\class{fragment}{{} = (x^2+x) + (x+1)} \\[3px]
&\class{fragment}{{} = x^2 + (x + x) + 1} \\[3px]
&\class{fragment}{{} = x^2 + 2x + 1}
\end{align}
$$And you need to put this in format:
revealjs:
include-before: [ '<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {enableAssistiveMml: false}});</script>'] |
Beta Was this translation helpful? Give feedback.
-
|
Running on Zen browser, I couldn't get the include-before to disable the extra clicks needed. By default, the math renderer was set to SVG, and switch to be MathML made it work. Alternatively, keeping with SVG and manually turning off Assistive MathML from the menu also worked, as mentioned by @rben01. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently there does not seem to be any way to introduce progressive elements / lines of a latex equation block. This is quite an important feature for teaching that is available via
\pauseand related tools in beamer.It is possible in a hacky way to avoid this by splitting things into multiple latex equations but this then precludes the use of aligned equations which is a significant cost to pay.
This may be a fundamental limitation imposed by mathjax / katex but seems worth at least looking into.
Beta Was this translation helpful? Give feedback.
All reactions