mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
53 lines
1.1 KiB
XML
53 lines
1.1 KiB
XML
[page.size: w=5cm, h=5cm]
|
|
[page.margins: 0cm]
|
|
|
|
// Test 1
|
|
// [box][
|
|
// [align: center]
|
|
// [box: ps=3cm, ss=1cm]
|
|
// [direction: ttb, ltr]
|
|
// [box: ps=3cm, ss=1cm]
|
|
// [box: ps=1cm, ss=1cm]
|
|
// [box: ps=2cm, ss=1cm]
|
|
// [box: ps=1cm, ss=1cm]
|
|
// ]
|
|
|
|
// Test 2
|
|
// [align: secondary=top] Top
|
|
// [align: secondary=center] Center
|
|
// [align: secondary=bottom] Bottom
|
|
// [direction: ttb, ltr]
|
|
// [align: primary=bottom]
|
|
// [box: w=1cm, h=1cm]
|
|
|
|
// Test 3
|
|
// [align: center][
|
|
// Somelongspacelessword!
|
|
// [align: left] Some
|
|
// [align: right] word!
|
|
// ]
|
|
|
|
// Test 4: In all combinations, please!
|
|
// [direction: ltr, ttb]
|
|
// [align: center]
|
|
// [align: secondary=origin]
|
|
// [box: ps=1cm, ss=1cm]
|
|
// [align: secondary=center]
|
|
// [box: ps=3cm, ss=1cm]
|
|
// [box: ps=4cm, ss=0.5cm]
|
|
// [align: secondary=end]
|
|
// [box: ps=2cm, ss=1cm]
|
|
|
|
[align: primary=left, secondary=center]
|
|
[box: w=4cm, h=2cm]
|
|
|
|
[direction: primary=btt, secondary=ltr]
|
|
[align: primary=center, secondary=left]
|
|
[box: h=2cm, w=1cm]
|
|
|
|
// [direction: rtl, btt]
|
|
// [align: center]
|
|
// [align: vertical=origin] ORIGIN
|
|
// [align: vertical=center] CENTER
|
|
// [align: vertical=end] END
|