typst-drafting icon indicating copy to clipboard operation
typst-drafting copied to clipboard

fix position.side

Open fredguth opened this issue 2 years ago • 1 comments

Hacky way to fix position.side. It is assuming a specific biding. Probably won't work in right-to-left languages.

fredguth avatar Oct 04 '23 19:10 fredguth

Thanks for the PR! However, I would avoid merging for a few reasons:

  1. As you noted, binding will change what this default should be, so I wouldn't want unexpected behavior as a result of swapping l/r on an odd page. Moreover, the margins are only swapped if binding is specified in the first place, otherwise they stay on their respective sides. Therefore, it makes the most sense to wait until get rules are implemented to detect these cases.
  2. It is possible to use margin-note in a smaller container -- it's how the minipages in the manual are generated: image In this case, it wouldn't be ideal to artificially swap left- and right-margin values based on the current page.

ntjess avatar Oct 04 '23 20:10 ntjess