Repository navigation
A simple utility to center the content of selected pages on the page - #331
Merged
AnEnglishmanInNorway merged 4 commits intoOct 23, 2026
Merged
Conversation
… of the fact that the page has been moved from the left side to the right side of a double page or vice versa
… of the fact that the page has been moved from the left side to the right side of a double page or vice versa
Abandon fixrighttoleft, introduce contenttocenter utility
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.
This started as an idea to deal with the repositioning of content on pages after the point at which a single page was added. Double pages are often artistically laid out as a unit, perhaps being more compact near the center margins, and more sparse at the outer edges. Add just one page, and this asymmetry is suddenly the wrong way round from that page onwards dense at the outer margins and sparse at the center. But I couldn't find a sensible algorithm to correctly rebalance that, and have deleted those trials.
The final result was a small utility which would center the bounding box of the contents of a page on the page, for selected pages. This is probably the best solution in any event, when we are creating a single page width pdf, avoiding a slight jumping of the balance of a page from left to right and back as you leaf through the document. Go out of the album editor, apply the center content utility to the mcf, and return to the editor to check the result and continue editing.