mirror of
https://github.com/typst/typst
synced 2025-06-28 08:12:53 +08:00
Make even more use of wide calls
This commit is contained in:
parent
32a6b673bc
commit
b2fb42cc70
@ -4,18 +4,24 @@
|
|||||||
// Test auto sizing.
|
// Test auto sizing.
|
||||||
|
|
||||||
Auto-sized circle. \
|
Auto-sized circle. \
|
||||||
#circle(fill: #eb5278, align(center, center, [But, soft!]))
|
#circle(fill: #eb5278)[
|
||||||
|
#align!(center, center)
|
||||||
|
But, soft!
|
||||||
|
]
|
||||||
|
|
||||||
Center-aligned rect in auto-sized circle.
|
Center-aligned rect in auto-sized circle.
|
||||||
#circle(fill: forest)[
|
#circle(fill: forest)[
|
||||||
#align!(center, center)
|
#align!(center, center)
|
||||||
#rect(fill: conifer, pad(5pt)[But, soft!])
|
#rect!(fill: conifer)
|
||||||
|
#pad!(5pt)
|
||||||
|
But, soft!
|
||||||
]
|
]
|
||||||
|
|
||||||
100%-width rect in auto-sized circle. \
|
100%-width rect in auto-sized circle. \
|
||||||
#circle(fill: forest, rect(width: 100%, fill: conifer)[
|
#circle(fill: forest)[
|
||||||
|
#rect!(width: 100%, fill: conifer)
|
||||||
But, soft! what light through yonder window breaks?
|
But, soft! what light through yonder window breaks?
|
||||||
])
|
]
|
||||||
|
|
||||||
Expanded by height.
|
Expanded by height.
|
||||||
#circle(fill: conifer)[A \ B \ C]
|
#circle(fill: conifer)[A \ B \ C]
|
||||||
|
@ -3,11 +3,10 @@
|
|||||||
---
|
---
|
||||||
100% rect in 100% ellipse in fixed rect. \
|
100% rect in 100% ellipse in fixed rect. \
|
||||||
#rect(width: 3cm, height: 2cm, fill: #2a631a)[
|
#rect(width: 3cm, height: 2cm, fill: #2a631a)[
|
||||||
#ellipse(width: 100%, height: 100%, fill: forest)[
|
#ellipse!(width: 100%, height: 100%, fill: forest)
|
||||||
#rect(width: 100%, height: 100%, fill: conifer)[
|
#rect!(width: 100%, height: 100%, fill: conifer)
|
||||||
#align(center, center)[Stuff inside an ellipse!]
|
#align!(center, center)
|
||||||
]
|
Stuff inside an ellipse!
|
||||||
]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
Auto-sized ellipse. \
|
Auto-sized ellipse. \
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
Auto-sized square. \
|
Auto-sized square. \
|
||||||
#square(fill: eastern)[
|
#square(fill: eastern)[
|
||||||
#align!(center)
|
#align!(center)
|
||||||
#pad(5pt, font(color: #fff, weight: bold)[Typst])
|
#pad!(5pt)
|
||||||
|
#font!(color: #fff, weight: bold)
|
||||||
|
Typst
|
||||||
]
|
]
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
|
|
||||||
// All sides together.
|
// All sides together.
|
||||||
#rect(fill: conifer)[
|
#rect(fill: conifer)[
|
||||||
#pad(10pt, right: 20pt)[
|
#pad!(10pt, right: 20pt)
|
||||||
#rect(width: 20pt, height: 20pt, fill: #eb5278)
|
#rect(width: 20pt, height: 20pt, fill: #eb5278)
|
||||||
]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
// Error: 13-23 missing argument: body
|
// Error: 13-23 missing argument: body
|
||||||
|
@ -13,8 +13,8 @@ A
|
|||||||
// Error: 16 cannot modify page from here
|
// Error: 16 cannot modify page from here
|
||||||
#pagebreak()
|
#pagebreak()
|
||||||
|
|
||||||
// Error: 12-16 cannot modify page from here
|
// Error: 11-15 cannot modify page from here
|
||||||
#page!("a4")
|
#page("a4")[]
|
||||||
]
|
]
|
||||||
C
|
C
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user