manim-slides icon indicating copy to clipboard operation
manim-slides copied to clipboard

Add subsection support across exporters

Open krystophny opened this issue 3 weeks ago • 2 comments

Summary

  • add next_subsection metadata plumbing so slides can record intra-slide checkpoints
  • wire the metadata into the Qt presenter, RevealJS template, PDF exporter, and PowerPoint converter via new CLI flags
  • document the workflow and add focused tests (subsection builder + PDF/PPTX smoke tests)

Testing

  • PYTHONPATH=. pytest tests/test_subsections.py
  • PYTHONPATH=. pytest tests/test_convert.py -k subsections

krystophny avatar Nov 07 '25 15:11 krystophny

Codecov Report

:x: Patch coverage is 66.19217% with 95 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 78.24%. Comparing base (c6c4ea6) to head (1dad0ed).

Files with missing lines Patch % Lines
manim_slides/present/player.py 33.01% 71 Missing :warning:
manim_slides/convert.py 88.88% 11 Missing :warning:
manim_slides/slide/base.py 78.37% 8 Missing :warning:
manim_slides/utils.py 81.25% 3 Missing :warning:
manim_slides/config.py 90.90% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #576      +/-   ##
==========================================
- Coverage   80.12%   78.24%   -1.88%     
==========================================
  Files          23       23              
  Lines        2038     2285     +247     
==========================================
+ Hits         1633     1788     +155     
- Misses        405      497      +92     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 07 '25 16:11 codecov[bot]

@jeertmans sorry for the mess - this is all work in progress trying various options. Also Changelog is nonsense right now. Maybe it's better to close the PR for now in order not to generate noise? Just to discuss the general idea with you: I removed most code again so we dont have to support "real" subsections but keep them as alias for slide/section with slightly different behavior. Mainly, I want to be able to generate PDFs with fully built slides on request and if technically possible provide multiple animations on single pptx slide. The remaining code should not be touched too much and I am right now in the process of reverting a lot. Regarding the manim hacks I am trying to find a cleaner solution. Earlier it would cut the video in subsection on cue points but I thought this is inefficient and we should rather just generate them right away without extra copies of videos. If you have some ideas, let me know!

krystophny avatar Nov 10 '25 11:11 krystophny

Hi @krystophny, any reason for closing this PR?

jeertmans avatar Nov 17 '25 08:11 jeertmans

@jeertmans I thought it's better to start from scratch again, since the patch was a vibe coded mess anyway. When I started, I didn't fully understand what manim-slides can already do now and wanted to discuss first to get the requirements. So basically, the only thing that is missing is the possibility to do a nice printout of the finished slides like in PowerPoint with multiple animations per page. So I could start again

a) A minimal solution with "page end" markers b) Real subsections that render also as vertical slides and multiple animations triggered on each PowerPoint slide.

I am personally not 100% convinced by the vertical slides, because it needs other key presses in the RevealJS HTML version, but see also the advantages of more fine grained navigation. Usually I like to click through a presentation with a Logitech presenter. Also, the question remains how one would handle this in the Qt app. PowerPoint or RevealJS style?

Just let me know what you prefer. It's not much work to get this to the level where it was for me & Claude/Codex.

krystophny avatar Nov 17 '25 10:11 krystophny

Ok, no problem! Feel free to open another PR when ready.

jeertmans avatar Nov 17 '25 13:11 jeertmans

So do you have any preference? In case we start with "page end" how would one call it in the API? Or shall we rather identify pages with slides right away and do "real" subsections like before?

krystophny avatar Nov 17 '25 15:11 krystophny

Hum, I don't know, I would prefer not to enforce any additional key binding: users should be able to choose what they prefer. So, the best is probably to document how to skip vertical slides, and also document how to modify the template to register a key binding that skips both vertical and horizontal slides.

jeertmans avatar Nov 18 '25 08:11 jeertmans

Hum, I don't know, I would prefer not to enforce any additional key binding: users should be able to choose what they prefer. So, the best is probably to document how to skip vertical slides, and also document how to modify the template to register a key binding that skips both vertical and horizontal slides.

Nice! I just found out Logitech R400 sends PageUp/PageDown as do probably many presenters. In that case, RevealJS cycles in order through BOTH horizontal and vertical slides, and it also does it for SPACE. In contrast to Left/Right which moves horizontally. I think that's the most natural choice. Shall we make the Qt app work the same? Then I know how to proceed.

krystophny avatar Nov 18 '25 09:11 krystophny

Yes, that looks good for me :-)

The SPACE button is no longer going for the next slide, since #539.

jeertmans avatar Nov 18 '25 10:11 jeertmans