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

[Experimental] --pptx-editable option to convert Markdown into editable PPTX #626

Merged
merged 26 commits into from
Jan 15, 2025

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Dec 26, 2024

Resolves #166 and #298.

This PR is adding an experimental --pptx-editable option to convert Markdown into editable PPTX when converting with --pptx option. The output can open in common presentation softwares with keeping reproducibility in most of slides, and can edit the text, image, and so on.

marp --pptx --pptx-editable slide.md

We have described how to make editable PPTX from Marp Markdown in marp-team/marp#82, but this solution is depending on the commercial software (Adobe Acrobat) or non OSS solution such as PDF to PPTX web services. I had thought that there was nothing the solution for making editable PPTX by OSS, but I've found LibreOffice has a conversion feature with headless soffice --headless, that can use the PDF input filter and the PPTX output filter.

By this implementation, we can provide completely open-source projects based solution to convert HTML-based slide into editable PPTX, without uploading a draft slide into third-party web service.

This implementation will convert Markdown into PDF first, and try converting that into PPTX with the headless LibreOffice. Thus, users have to install LibreOffice before using --pptx-editable option.

Limitations

  • The slide reproducibility would become lacked rather than existing PPTX conversion. You should not expect the perfect reproducibility of the slide preview in the output PPTX.
  • If the rich design has been included to the slide, such as using gaia, uncover built-in theme and custom themes, may break the layout or fail conversion due to that cannot load with LibreOffice.
  • Unlike the current PPTX conversion, the speaker notes (<!-- notes -->) are not included in the output PPTX.

The almost part of this conversion process is depending on upstream tools, the browser (HTML -> PDF) and LibreOffice (PDF -> PPTX), so there is no room to control intermediate outputs by Marp. So it is difficult to fix these limitations in Marp.

Due to that limitations, we are planning to ship this feature as an experimental feature.

@yhatt yhatt marked this pull request as ready for review January 15, 2025 21:33
@yhatt yhatt merged commit 66587c7 into main Jan 15, 2025
13 checks passed
@yhatt yhatt deleted the pptx-editable branch January 15, 2025 22:56
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.

Generated PPTX is creating Master Slides, not Slides (as I was hoping)
1 participant