diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-10-07 16:13:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-07 14:13:24 +0000 |
| commit | 1d2a222818991bcc3ade54fdd30480ce1fb8826f (patch) | |
| tree | a189d2685f978c1da17189276a221278aeac1c17 /crates | |
| parent | db9debca6d7468692bea3943a4f78a5f35c1b23d (diff) | |
Error for parent-scoped figures without placement (#5151)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst/src/model/figure.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/typst/src/model/figure.rs b/crates/typst/src/model/figure.rs index 00a9aafd..1d3c9c95 100644 --- a/crates/typst/src/model/figure.rs +++ b/crates/typst/src/model/figure.rs @@ -351,6 +351,12 @@ impl Show for Packed<FigureElem> { .with_float(true) .pack() .spanned(self.span()); + } else if self.scope(styles) == PlacementScope::Parent { + bail!( + self.span(), + "parent-scoped placement is only available for floating figures"; + hint: "you can enable floating placement with `figure(placement: auto, ..)`" + ); } Ok(realized) |
