WIP, ENH: Add alt option to glue figure #394
Closed
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.
Closes #211
This tackles the first part of the problem, i.e. adding an
alt
optional argument to theglue:figure
directive, but there's still work to be done to pass through thealt
string to the final figure that is embedded in the output. I haven't had success tracing through the various abstractions/transforms that get from aPasteNode
within the containing figure to the actualimage
node that ultimately gets rendered in the output. My sense is the best way to do this is to add aPasteImageNode
(or similar) subclass that keeps the alt-text as an attribute, and modify the subsequent transforms etc. to ensure that the alt text is passed all the way through to the finalcreate_render_image
step. I'm not sure if this approach is consistent with the current design, so I figured I'd open a WIP PR hoping for someone more knowledgeable to weigh in.