mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 01:36:45 +00:00
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). Closes #11433. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Chris Callison-Burch <ccb+github@upenn.edu>
2.3 KiB
2.3 KiB
Test that content after a table stays on the same slide.
% pandoc -t native
## Slide with Bullets and Table
- First bullet before table
- Second bullet before table
| A | B |
|---|---|
| 1 | 2 |
- Third bullet after table
- Fourth bullet after table
^D
[ Header
2
( "slide-with-bullets-and-table" , [] , [] )
[ Str "Slide"
, Space
, Str "with"
, Space
, Str "Bullets"
, Space
, Str "and"
, Space
, Str "Table"
]
, BulletList
[ [ Plain
[ Str "First"
, Space
, Str "bullet"
, Space
, Str "before"
, Space
, Str "table"
]
]
, [ Plain
[ Str "Second"
, Space
, Str "bullet"
, Space
, Str "before"
, Space
, Str "table"
]
]
]
, Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "A" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "B" ] ]
]
])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ]
]
]
]
(TableFoot ( "" , [] , [] ) [])
, BulletList
[ [ Plain
[ Str "Third"
, Space
, Str "bullet"
, Space
, Str "after"
, Space
, Str "table"
]
]
, [ Plain
[ Str "Fourth"
, Space
, Str "bullet"
, Space
, Str "after"
, Space
, Str "table"
]
]
]
]