Show borders around the main text area, header and footer in Typst documents.
This may be useful to understand and debug layout issues.
The idea is similar to the LaTeX layout
package.
#import "@preview/guide-lines:v0.1.0": background
#set page(paper: "a6")
#set page(background: background())
#lorem(100)
#pagebreak()
#set page(background: background(stroke: blue + 1pt))
#lorem(100)
The following limitations are known, PRs to address them are always welcome!:
- If
page.margin
contains theinside
oroutside
keys, andpage.binding
is set toauto
, the package will currently assume an LTR document with binding on the left side. It would be correct to follow Typst and determine the binding according to the text direction.
The following Typst issues and forum post inspired this package and informed its design and implementation: