Skip to content

Comments

feat: add --slide-numbers option to include slide number comments#90

Open
eercanayar wants to merge 1 commit intossine:masterfrom
eercanayar:feature/slide-numbers
Open

feat: add --slide-numbers option to include slide number comments#90
eercanayar wants to merge 1 commit intossine:masterfrom
eercanayar:feature/slide-numbers

Conversation

@eercanayar
Copy link

Summary

Adds a new --slide-numbers flag that inserts HTML comments (<!-- Slide N -->) at the beginning of each slide in the output.

Motivation

This helps with:

  • Referencing specific slides in the converted markdown
  • Navigating large presentations (e.g., 200+ slides)
  • Correlating markdown content with original PPTX slides

Relates to #60 - While you mentioned it was "too little a feature", I found it essential when working with large presentations where I need to reference specific slides. The implementation is minimal and opt-in, so it doesn't affect default behavior.

Changes

  • Added slide_numbers: bool = False to ConversionConfig
  • Added --slide-numbers CLI argument
  • Added put_slide_number() method to Formatter base class
  • Updated both Formatter.output() and QuartoFormatter.output() to use it

Example Output

<!-- Slide 1 -->
# Introduction

Content here...

---

<!-- Slide 2 -->
# Next Topic

More content...

Testing

Tested with a 269-slide presentation - all slides correctly numbered.

Adds a new --slide-numbers flag that inserts HTML comments (<-cli Slide N -->)
at the beginning of each slide in the output. This helps with:
- Referencing specific slides in the converted markdown
- Navigating large presentations
- Correlating markdown content with original PPTX slides

The feature is opt-in and works with all output formats (markdown, wiki, madoko, quarto).

Relates to ssine#60
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.

1 participant