PgBiel
915743e6e8
use could_progress_at_top
for footers
2025-05-16 02:09:51 -03:00
PgBiel
3ec699541a
use may_progress_with_repeats
2025-05-16 02:09:51 -03:00
PgBiel
2127a9e044
store initial after repeats
2025-05-12 02:21:58 -03:00
PgBiel
3bd7486362
Merge branch 'main' into table-subheaders
2025-05-09 13:46:34 -03:00
Tobias Schmitz
b322da930f
Respect RTL cell layouting order in grid layout ( #6232 )
...
Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
2025-05-06 08:26:55 +00:00
PgBiel
1d217e4019
allow skipping from non-repeated header on lack of space
...
Can lead to orphans, but without enough space, anything goes.
2025-05-06 03:56:21 -03:00
PgBiel
dafcf8b11e
temp fix for imprecision in may_progress_with_offset
...
better idea: check once at the start of the region
if there are non-header rows, or we could progress at the start of the region, we may progress
2025-05-06 03:45:21 -03:00
PgBiel
4bcf5c11a7
move lrows to Current
2025-05-04 02:29:03 -03:00
PgBiel
b7c1dba314
improve variable names related to repeating headers
2025-05-01 00:24:55 -03:00
PgBiel
5289bdae50
update some field docs
2025-05-01 00:08:15 -03:00
PgBiel
8045c72d28
switch to only snapshotting for orphan prevention
2025-04-30 21:10:33 -03:00
PgBiel
09e7062b38
create RowState abstraction
...
nicer to use than what that was before
store temp values during row layout
2025-04-30 02:44:56 -03:00
PgBiel
6c42f67b3d
only flush orphans outside of headers and footers
2025-04-30 02:14:47 -03:00
PgBiel
3ef2137619
flush orphans and pending headers at the same time (broken)
...
Goal is to ensure pending headers are flushed before a region break, else non-repeating headers will appear more than once
Must not be called while laying out headers, however, so it's broken
2025-04-30 01:49:43 -03:00
PgBiel
ab852a5151
some additional docs
2025-04-30 01:46:47 -03:00
PgBiel
9c49bd507a
remove redundant check for short-lived footers
...
Now it is all handled at the resolving stage.
2025-04-20 19:22:19 -03:00
PgBiel
71ae276071
add Deref to Repeatable
...
honestly, all the unwrapping was just generating noise.
2025-04-20 15:20:07 -03:00
PgBiel
9a01b9bfe8
remove unnecessary short lived header check
2025-04-20 13:38:45 -03:00
PgBiel
6e21eae3eb
mark headers as short-lived during resolve
2025-04-20 13:13:20 -03:00
PgBiel
af0c27cb98
adjust Current visibility
2025-04-19 22:34:58 -03:00
PgBiel
5e572a56f3
rename a few Current fields
2025-04-19 21:16:18 -03:00
PgBiel
9b5c77a3a3
move per-region state to Current
2025-04-19 20:42:41 -03:00
PgBiel
e0bfe90e12
restore orphan snapshot after pending header relayout
2025-04-11 14:35:50 -03:00
PgBiel
f6bc7f8d45
use exclusively snapshots for pending header orphan prevention
...
- delete current_header_rows
2025-04-11 14:16:49 -03:00
PgBiel
40bc08291d
create lrows orphan snapshot
...
- Indicate some rows at the end cannot be orphans
2025-04-09 14:52:58 -03:00
PgBiel
4a83d05625
switch to active header layout in finish_region
2025-04-09 14:01:47 -03:00
PgBiel
62c5b551f1
rename 'in_last_with_offset' to 'may_progress_with_offset'
2025-04-07 21:30:49 -03:00
PgBiel
05d4af43b6
only match consecutive conflicting headers
2025-04-07 21:20:53 -03:00
PgBiel
6b133dca3f
fix gutter popping edge case
...
- With a header at the end, decrease the header row count for orphan prevention.
2025-04-06 15:01:39 -03:00
PgBiel
0c6fae92f0
fix orphan prevention
...
- Include new headers at the start as part of the region's header rows
- Check if header rows are all rows
2025-04-06 14:14:16 -03:00
PgBiel
fe08df8ee6
fix consecutive header row check
...
check if there is another header at the end, not if at the next row
2025-04-06 14:12:48 -03:00
PgBiel
e73c561f16
fix header height and rows state calculations
...
- remove non-repeating header height on pending flush
- use lrows
- reset current region dataon orphan prevention row wipe
2025-04-06 13:37:17 -03:00
PgBiel
fbb0306ebc
fix non stopping footer
2025-04-06 04:47:36 -03:00
PgBiel
75403f86a9
flush pending headers as soon as possible
...
- dont wait until the end of the region, as a header can start and end in the same region (i.e. never repeat).
2025-04-06 04:00:23 -03:00
PgBiel
59dc458188
fix line layout with missing header bottoms
2025-04-06 03:42:30 -03:00
PgBiel
f9569efc40
adapt usages of header_height to repeating_header_height
...
- Document unchanged usages
2025-04-06 02:12:05 -03:00
PgBiel
d172eccfd9
store height of each repeating header
...
So we can update in the middle of the region
2025-04-06 02:01:32 -03:00
PgBiel
ecc93297f8
initial attempt on repeating header height
...
- Faulty, as we have to update it when pushing new pending headers too
- Need to have a vector associating a height to each row...
2025-04-06 00:06:40 -03:00
PgBiel
1301b901b7
count header rows in each region
...
- Currently also includes non-repeatable header row heights, which will lead to bugs on rowspans; needs fix
2025-04-05 01:14:17 -03:00
PgBiel
e586cffa6c
finish region adjustments
...
- flush pending headers
- properly layout headers at region start
2025-04-04 22:02:09 -03:00
PgBiel
af35e287af
finish layout_headers refactor
...
- Subtract footer height in it already
- Still need to fix finish region
2025-04-04 21:24:20 -03:00
PgBiel
6029e6f3bb
begin placing new headers
...
Considerations:
- Need to change layout headers algorithm to
1. Place those headers
2. But in a new region, also place other repeating headers
3. Keep footer height up-to-date without much intervention
2025-04-04 21:24:20 -03:00
PgBiel
b420588c19
more header changes
2025-04-04 21:24:20 -03:00
PgBiel
4bd3abf44d
initial multi heading progress
...
pending headers change
2025-04-04 21:23:38 -03:00
evie
3650859ae8
Fix cargo clippy
warnings (mostly about .repeat.take
and .next_back
) ( #6038 )
2025-03-11 10:00:53 +00:00
Laurenz
69c3f95705
Bump MSRV to 1.83 and Rust in CI to 1.85 ( #5946 )
2025-02-24 12:28:01 +00:00
Michael Färber
5c876535cc
Move CellGrid
from typst-layout
to typst-library
( #5585 )
2025-01-06 15:20:28 +00:00
Laurenz
be7cfc85d0
Split out four new crates ( #5302 )
2024-10-27 18:04:55 +00:00