Aligned equations displayed line by line in HTML slide show

10 views
Skip to first unread message

Corrin Clarkson

unread,
Oct 22, 2025, 7:26:02 AMOct 22
to PreTeXt support
Hello,

I am looking for a way to create HTML slide shows with aligned equations that are shown line by line. This is for stepping through computations in class. 

I tried adding pause to rows of an equation as shown below, but the whole block was displayed all at once in the slides. 
<p>
      <md>
        <mrow>x \amp = r\cos\theta</mrow>
        <mrow pause="yes">y \amp = r\sin\theta</mrow>
      </md>
    </p>

I know reveal.js can do this as I'm able to achieve something like this with the following code in Presentations – Quarto.
\begin{align*}
a &= b + c \\
& \class{fragment}{ = d + e} \\
& \class{fragment}{ = f - g} \\
& \class{fragment}{ = h}
\end{align*}
See discussion here: Support for fragments or equivalents with latex equations in revealjs presentations · quarto-dev/quarto-cli · Discussion #3224 · GitHub

Is there a way to do this in PreTeXt slides or could this feature be added?

Best,
Corrin

Rob Beezer

unread,
Oct 23, 2025, 12:25:10 PMOct 23
to pretext...@googlegroups.com
Dear Corrin,

Thanks for your message and interest in slideshows.

Short answer: no, you can't do that now, but it is a feature worth pursuing.

Workaroud: if the need is urgent, maybe a sequence of #p (with @pause), each
holding a single #m, would be a workable imitation. Not centered, likely just a
paragraph indent.

New feature: thanks for that Quarto link. Speculating: "\class{}" is a MathJax
thing, and when you use "\class{fragment}" you get the RevealJS .fragment class
that will make pauses happen?

Are you willing to experiment? Make a one-slide PreTeXt slideshow with several
displayed equations in an #md. Build the PreTeXt Reveal.JS output version.
Hand-edit it make some (not all?) of the equations act as pause locations. Send
me the original and the hand-edited version (posting here is fine). Note that
the Quarto thread suggests disabling MathJax's accessibility feature, so try
that. We would have to discuss the wisdom of doing that automatically...

Rob


On 10/22/25 04:26, Corrin Clarkson wrote:
> Hello,
>
> I am looking for a way to create HTML slide shows with aligned equations that
> are shown line by line. This is for stepping through computations in class.
>
> I tried adding pause to rows of an equation as shown below, but the whole block
> was displayed all at once in the slides.
> <p>
>       <md>
>         <mrow>x \amp = r\cos\theta</mrow>
>         <mrow pause="yes">y \amp = r\sin\theta</mrow>
>       </md>
>     </p>
>
> I know reveal.js can do this as I'm able to achieve something like this with the
> following code in Presentations – Quarto <https://quarto.org/docs/presentations/>.
> \begin{align*}
> a &= b + c \\
> & \class{fragment}{ = d + e} \\
> & \class{fragment}{ = f - g} \\
> & \class{fragment}{ = h}
> \end{align*}
> See discussion here: Support for fragments or equivalents with latex equations
> in revealjs presentations · quarto-dev/quarto-cli · Discussion #3224 · GitHub
> <https://github.com/quarto-dev/quarto-cli/discussions/3224>
>
> Is there a way to do this in PreTeXt slides or could this feature be added?
>
> Best,
> Corrin
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-support/
> d2745e3b-903b-4712-a633-9e7003c59f95n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-support/d2745e3b-903b-4712-
> a633-9e7003c59f95n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages