Repository navigation
Fixes #195: Support floating (anchored) images - #197
Merged
Merged
Conversation
- Add an optional anchor child to image that makes it a floating image (wp:anchor) positioned relative to the page, margin, column, character, paragraph, or line, aligned or offset, with square, top-and-bottom, or no wrapping, a wrap distance, and a behind-text option. Tight wrapping is not supported. - Create the picture inline through POI and then convert it to an anchor. - Ignore @fit-to-page-width for floating images. Co-Authored-By: Claude Sonnet 5.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
anchorchild ofimagemakes it a floating image. Attributes:h-relative(page, margin, column, character),h-alignorh-offset,v-relative(page, margin, paragraph, line),v-alignorv-offset,wrap(square, top-and-bottom, none),wrap-text,distance,behind-text. Added to the RNG with documentation.wp:anchor. Later floating images get a higherrelativeHeight, so they are in front of earlier ones.@fit-to-page-widthis ignored (with a warning) for floating images. Tight wrapping is not supported. Unexpected attribute values warn and fall back to the defaults.anchorare unchanged.distancedocumentation notes that the space is also reserved above the image and can push the previous paragraph's last line down. Usev-offsetto avoid it.Testing
mvn installpasses.Closes the second half of what was split from #167.
🤖 Generated with Claude Code