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

Add new option --ShowBulletsIndividually #276

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

StefanSchroeder
Copy link

Changes Introduced

  • This patch adds a new boolean commandline option --ShowBulletsIndividually
  • When added, any bullet list that is introduced with "*" items (without leading space) will add the items one-by-one on individual slides.

It's easy to mix and match items to be shown or not shown by adding an individual space in front of the asterisk.

If there is trailing text behind the list, it will be shown together with the last item of the list.

@maaslalani
Copy link
Owner

maaslalani commented Dec 31, 2023

Hey @StefanSchroeder, this is a really awesome contribution. Thank you for these changes!

I think to get this feature merged I would likely want something more declarative / within the markdown document itself (at least I think) so that:

  1. Live-editing works
  2. People can mix individual bullets with grouped bullets

What do you think about the following proposal (I'm happy to also consider other alternatives and suggestions as well)

Essentially, currently each slide is delimited with ---, what if we added a partial slide delimiter (***) to incrementally append content to a slide without changing the page number.

# Slide 1

This is the first slide.

---

# Slide 2

This is the second slide.

***

This content will be appended to the second slide (when the next button is clicked).

***

This content will be appended to the second slide (when the next button is clicked).

---

# Slide 3

This is the third slide.

I think this solution:

  1. Keeps markdown compatibility with the *** instead of ---.
  2. Declares how the presentation is revealed
  3. Makes it more flexible (can be used for revealing code blocks or any content instead of just bullet points)
# Slide 1

* First bullet

***

* Second bullet

***

* Third bullet

---

# Slide 2

* Grouped bullets
* Grouped bullets
* Grouped bullets

@StefanSchroeder
Copy link
Author

Ok, I'll provide an update. The common-mark specifications calls this a 'thematic block'.

https://spec.commonmark.org/0.30/#thematic-break

This spec is pretty intricate and allows several deviations from a simple three-character block, e.g. there can be spaces in between. Is there any particular Markdown dialect that you prefer? I'll try to come up with a single regexp that matches the specification. But that seems to be about it what needs to be changed.

There is one caveat though. Since we are just exploding the slides to be one new slide per section, the page counter will not reflect the number of pages any more, but the number of sections. There is more than one way to fix that. This would need a design decision.

@StefanSchroeder
Copy link
Author

Hmm, I pushed my update to my fork, but when I open a new PR I get redirected to this one. I am not sure how to proceed. Is there anything I overlooked?

@oysandvik94
Copy link

If the incremental points are enabled by the *** seperator, should the --ShowBulletsIndividually flag be needed?

@maaslalani
Copy link
Owner

If the incremental points are enabled by the *** seperator, should the --ShowBulletsIndividually flag be needed?

No, the flag would not be needed anymore.

@StefanSchroeder
Copy link
Author

the point of the flag originally was to not change the default behavior. the option would give users control to only use that feature if specifically requested.

@xukai92
Copy link

xukai92 commented Apr 5, 2024

it would be nice to support ***.
i'd like to contribute with some help

  • where the logic should be added in the code base?
  • what extra need to do e.g. to make live update work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants