-
Notifications
You must be signed in to change notification settings - Fork 323
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
Figure captions not appearing in pptx output (Output format pptx does not currently support FloatRefTarget nodes) #8667
Comments
Thanks for the report. This is the results with 1.3.450 No caption in 1.4 and current 1.5 @cscheid I am surprised we missed this - is there a reason I am not seeing to have this change in behavior for Powerpoint with the new cross reference system ? Or just a missing piece ? I understand this could be a cross ref limitation with powerpoint... Related to |
@justinaskav to be clear, here by setting a id with a prefix like this Quarto is currently missing support for this in powerpoint (the issue here). If no id with |
@cderv thanks for the workaround! |
@cscheid I don't know how we could handle this, but I believe we should restore previous behavior for 1.5. I was thinking we could do something rather rough like not trying to parse FloatRefTarget at all for formats we know won't handle it. Something like --- a/src/resources/filters/quarto-pre/parsefiguredivs.lua
+++ b/src/resources/filters/quarto-pre/parsefiguredivs.lua
@@ -356,6 +356,11 @@ function parse_floatreftargets()
}), false
end
+ -- Some formats does not support Float Targets reference
+ if _quarto.format.isPowerPointOutput() then
+ return {}
+ end
+
return {
traverse = "topdown",
Figure = function(fig) This would mean that no matter the identifier we would ignore the node for some formats like powerpoint. This would handle the Figure as a normal figure. We could also try to detect ids to able to warn before even parsing them that FloatRefTarget are ignored, or ignoring formats in After all it seems we are doing some AST nodes processing to find FloatRefTarget when we know we won't be able to handle them later with |
That's going to be really hard to do and regression prone this close to shipping. |
(I agree that we want to fix the regression.) |
Do you think it is really regression prone if we managed to target only PowerPoint output , and even only Figure which is the reported issue ? I am thinking we could do something quite scoped maybe. We would need to fix for other formats probably and other types obviously but could do this later. |
Bug description
Starting from 1.4.367, figure captions are not included in Powerpoint output.
When rendering, this warning is emitted:
Until 1.4.366, the figure caption text was shown alongside the image.
Steps to reproduce
Expected behavior
The text "Figure Caption" is visible below the figure. This is the behaviour until 1.4.366.
Actual behavior
No text appears below the figure. Also, when rendering, a warning is emitted (shown in Bug Description part).
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: