Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ All changes included in 1.5:

## Powerpoint Format

- ([#8667](https://github.com/quarto-dev/quarto-cli/issues/8667)): Fix regression with `FloatRefTarget` nodes in PPTX output.
- ([#9680](https://github.com/quarto-dev/quarto-cli/issues/9680), [#9681](https://github.com/quarto-dev/quarto-cli/issues/9681)): Fix issues with HTML tables parsed by Quarto when converting to powerpoint presentations.

## Interactive Document
Expand Down
17 changes: 17 additions & 0 deletions src/resources/filters/customnodes/floatreftarget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1050,4 +1050,21 @@ end, function(float)
end
end)

_quarto.ast.add_renderer("FloatRefTarget", function(_)
return _quarto.format.is_powerpoint_output()
end, function(float)
if float.content == nil then
warn("Can't render float without content")
return pandoc.Null()
end
local im = quarto.utils.match("Plain/[1]/Image")(float.content)
if im == nil then
warn("PowerPoint output for FloatRefTargets require a single image as content")
return pandoc.Null()
end
decorate_caption_with_crossref(float)
im.caption = quarto.utils.as_inlines(float.caption_long)
return pandoc.Para({im})
end)

global_table_guid_id = 0
9 changes: 9 additions & 0 deletions tests/docs/smoke-all/2024/06/24/8667.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
format: pptx
---

## Slide Title

The text "Figure Caption" is not shown in Powerpoint output.

![Figure Caption](./assets/existing-image.jpg){#fig-figure}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.