Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animate paragraphs/text line by line #162

Closed
alinush opened this issue May 11, 2020 · 4 comments
Closed

Animate paragraphs/text line by line #162

alinush opened this issue May 11, 2020 · 4 comments
Labels
question Not issue, just a question

Comments

@alinush
Copy link

alinush commented May 11, 2020

Hi,

I was just giving Marp a try: it looks like the perfect solution for doing slides quickly.
Unfortunately, I can't figure out how to "animate" the text on each slide.

I'm not looking for anything fancy. I just want to be able to gradually introduce the text on the slide, line by line to the audience. I don't want to display the full slide with the whole text, because it's too much information at once. This will distract the audience, in my experience.

Is there a way to do this in Marp? I apologize if this is trivial. I searched in the marp-core & marpit issues, and on the https://marp.app/ and https://marpit.marp.app/ websites.

In particular, is there a way to animate the equations in begin{aligned} one by one? (Once again, displaying a block of 10 equations to the audience is not a good idea in my experience.)

Thank you,
Alin

Later edit: I am basically looking for something like \pause in Beamer or like "pauses" in pandoc's presentation mode

@yhatt yhatt added the question Not issue, just a question label May 11, 2020
@yhatt
Copy link
Member

yhatt commented May 12, 2020

Refer to marp-team/marpit#195 and marp-team/marpit#209.

The most similar solution you wanted is fragmented list in Marpit.

* $x=a+b$
* $x=a+b+c$
* $x=a+b+c+d$
* $x=a+b+c+d+e$
* $x=a+b+c+d+e+f$
* ...

<style scoped>ul { padding: 0; list-style: none; }</style>

<style scoped> is required to hide bullets on the regular list.

An another way is wrapping math in HTML that is assigned data-marpit-fragment attribute (explained in marp-team/marpit#195). It's a way similar to reveal.js fragments and suited to pause more flexible contents. Notice that it's advanced usage and Marpit does not yet recognize them correctly

@alinush
Copy link
Author

alinush commented May 12, 2020

Thank you. I unfortunately missed the "fragmented list" when I skimmed the documentation.

Hacking equation animation with bulletpoint lists will work for most things, but I don't think it'll work for certain aligned blocks like this one:

\begin{aligned}
a + b &= c + d\\
    a &= c + d - b
\end{aligned}

@yhatt
Copy link
Member

yhatt commented May 12, 2020

Unfortunately Marp team has no ones familiar to TeX (KaTeX) so we have no idea how to use advanced fragments within math syntax.

For contributor: Marpit fragments is not flexible as much as Beamer, but nevertheless extending macro for using Marpit fragments in Marp Core's math plugin may help.

@yhatt
Copy link
Member

yhatt commented May 12, 2020

We close this question by following our support rule.

Fragments in math block is out of the scope that indicated in the title of this issue. Please create new issue if you want.

Please not contain multiple reports into one issue. It should have only one theme.

-- https://github.com/marp-team/.github/blob/master/CONTRIBUTING.md#report-issue

@yhatt yhatt closed this as completed May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Not issue, just a question
Projects
None yet
Development

No branches or pull requests

2 participants