PPTX writer: keep tables and surrounding text on same slide#11411
Open
ccb wants to merge 2 commits into
Open
Conversation
Previously, when a slide contained bullet points before and after a table, content would be split across multiple slides or use a two-column layout that didn't preserve the source order. This change: 1. Modified splitBlocks' in Presentation.hs to continue accumulating content after tables instead of immediately splitting to a new slide. 2. When a slide has a table with surrounding text, use ContentSlide (single column) instead of ContentWithCaptionSlide (two columns) to preserve content order. 3. Added vertical stacking in Output.hs (shapesToElementsStacked) to properly position multiple shapes (tables + text) within a content area. Space is allocated proportionally based on content size (paragraphs and table rows). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add explicit Double type annotation for heightPerUnit - Remove unused estimateTableHeight function Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Presentation.hs: Modified
splitBlocks'to continue accumulating content after tables instead of immediately splitting to a new slidePresentation.hs: When a slide has a table with surrounding text, use
ContentSlide(single column) instead ofContentWithCaptionSlide(two columns) to preserve content orderOutput.hs: Added
shapesToElementsStackedfunction to properly position multiple shapes (tables + text) vertically within a content area. Space is allocated proportionally based on content size (paragraphs and table rows)Test plan
table-with-surrounding-contentExample markdown that previously had issues:
🤖 Generated with Claude Code