Skip to content
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

Fix figure caption position #565

Merged
merged 3 commits into from
Oct 20, 2023
Merged

Fix figure caption position #565

merged 3 commits into from
Oct 20, 2023

Conversation

vgeorge
Copy link
Contributor

@vgeorge vgeorge commented Oct 19, 2023

Address issue raised at NASA-IMPACT/nasa-apt#681 (comment).

This changes the transformer function applyNumberCaptionsToDocument to revert caption position only for table blocks. I've also removed code related to tables and figures from the numbering context, because it conflicts with the transformer. I've chosen to use the transformer instead of the numbering context for tables/figures captions because the later doesn't handle positioning.

@frozenhelium @wrynearson this is ready for review. Please confirm if tables are position above and figures below on PDF previews.

Copy link
Member

@wrynearson wrynearson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I tested this on both PDF types.

FWIW, a future feature could be to add these numbers for captions (figures, but also table) into the view mode, based on this comment.

@wrynearson wrynearson merged commit 7783e33 into develop Oct 20, 2023
14 checks passed
@wrynearson wrynearson deleted the fix/captions branch October 20, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants