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

page.margin is not affected by the state of page.flipped #4158

Open
1 task done
Andrew15-5 opened this issue May 16, 2024 · 0 comments
Open
1 task done

page.margin is not affected by the state of page.flipped #4158

Andrew15-5 opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working layout Related to layout, positioning, etc.

Comments

@Andrew15-5
Copy link
Contributor

Andrew15-5 commented May 16, 2024

Description

I need to make a document that can and will have a landscape orientation (I really dislike the flipped name btw).

In the guideline I have it is stated, that when a page is in the landscape orientation the margins are supposed to change/move with how the 4 sides of the paper are changed/turned, i.e., if page in the landscape orientation is a "normal-orientation-page turned 90 degrees clockwise", then the top margin becomes what left was, right becomes what top was etc. So I have to do:

#set page(flipped: true, margin: (
  top: page.margin.left,
  bottom: page.margin.right,
  rest: page.margin.top,
))

This way, when you turn the landscape sheet back to how the portrait sheet is oriented, the margins become identical. In other words, if you put #rect(width: 100%, height: 100%) on portrait and landscape oriented pages, then if you stack them all in the portrait orientation then the rect outline on all pages will be in the identical position on a page (mirrored).

But in the v0.11.0 not width & height nor margin of the page is affected by flipped field (I also had to conditionally change custom width and height variables' value manually because of this in the "sub-document" which is included in the main one). I suspect that it was simply never thought of or just wasn't implemented yet (everything is static and not reactive/dynamic). But if it was intentional, then I want to hear arguments against the adaptive field values.

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst
@Andrew15-5 Andrew15-5 added the bug Something isn't working label May 16, 2024
@Enivex Enivex added the layout Related to layout, positioning, etc. label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working layout Related to layout, positioning, etc.
Projects
None yet
Development

No branches or pull requests

2 participants