Skip to content

Support for inside and outside margins - #1308

Merged
laurmaedje merged 38 commits into
typst:mainfrom
Luis-Licea:343-support-for-inside-and-outside-margins
Jun 12, 2023
Merged

laurmaedje merged 38 commits into
typst:mainfrom
Luis-Licea:343-support-for-inside-and-outside-margins

Conversation

@Luis-Licea

Copy link
Copy Markdown
Contributor

Fixes #343

@Luis-Licea
Luis-Licea marked this pull request as ready for review June 11, 2023 01:54

@PgBiel PgBiel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey, thanks for the PR! Seems like you got very far here. Thanks for your hard work!

I'm leaving here some feedback which I believe will be important, but most of the comments are nitpicks; shouldn't be too much. Feel free to raise any questions regarding my review.

Comment thread src/geom/sides.rs Resolved
Comment thread src/geom/sides.rs Resolved
Comment thread src/geom/sides.rs Resolved
Comment thread library/src/layout/page.rs Resolved
Comment thread library/src/layout/page.rs Resolved
Comment thread src/geom/sides.rs Resolved
Comment thread tests/typ/layout/two-sided.typ Resolved
Comment thread src/geom/mod.rs Resolved
Comment thread docs/src/lib.rs Resolved
Comment thread src/geom/sides.rs Resolved
@PgBiel

PgBiel commented Jun 11, 2023

Copy link
Copy Markdown
Contributor

Looking awesome now 🚀

@laurmaedje

Copy link
Copy Markdown
Member

I think inside and outside are the wrong way around here. When binding a book, the first page would be the title page. When the binding is on the left side, outside should thus mean right on page 1 and left on page 2. Currently, it is the other way around.

@laurmaedje laurmaedje changed the title 343 support for inside and outside margins Support for inside and outside margins Jun 12, 2023
@laurmaedje

Copy link
Copy Markdown
Member

I have fixed which way around it is and also added a new binding property to the page function that determines where the pages will be bound, so that inside and outside retain their semantic meaning also for right-bound works (typical in RTL languages).

@laurmaedje
laurmaedje merged commit 3284e7f into typst:main Jun 12, 2023
@laurmaedje

Copy link
Copy Markdown
Member

Thanks!

Dikluwe pushed a commit to Dikluwe/typst-crystalline that referenced this pull request Sep 12, 2026
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.

Support for inside and outside margins

3 participants