mirror of
https://github.com/typst/typst
synced 2025-05-18 11:05:28 +08:00
parent
a1b0a41883
commit
2b812259c2
@ -285,12 +285,16 @@ impl<'a> FlowLayouter<'a> {
|
||||
}
|
||||
.resolve(styles);
|
||||
|
||||
let is_columns = block.is::<ColumnsElem>();
|
||||
// Temporarily delegerate rootness to the columns.
|
||||
let is_root = self.root;
|
||||
if is_root && block.is::<ColumnsElem>() {
|
||||
self.root = false;
|
||||
self.regions.root = true;
|
||||
}
|
||||
|
||||
// Layout the block itself.
|
||||
let sticky = BlockElem::sticky_in(styles);
|
||||
let fragment = block.layout(vt, styles, self.regions)?;
|
||||
self.regions.root = self.root && is_columns;
|
||||
|
||||
for (i, frame) in fragment.into_iter().enumerate() {
|
||||
if i > 0
|
||||
@ -305,6 +309,7 @@ impl<'a> FlowLayouter<'a> {
|
||||
)?;
|
||||
}
|
||||
|
||||
self.root = is_root;
|
||||
self.regions.root = false;
|
||||
self.last_was_par = false;
|
||||
|
||||
|
BIN
tests/ref/meta/footnote-columns.png
Normal file
BIN
tests/ref/meta/footnote-columns.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
9
tests/typ/meta/footnote-columns.typ
Normal file
9
tests/typ/meta/footnote-columns.typ
Normal file
@ -0,0 +1,9 @@
|
||||
// Test footnotes in columns, even those
|
||||
// that are not enabled via `set page`.
|
||||
|
||||
---
|
||||
#set page(height: 120pt)
|
||||
#align(center, strong[Title])
|
||||
#show: columns.with(2)
|
||||
#lorem(3) #footnote(lorem(6))
|
||||
Hello there #footnote(lorem(2))
|
Loading…
x
Reference in New Issue
Block a user