Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Use show-set rule to make equations breakable
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicEricEE committed May 31, 2024
1 parent 8360732 commit dfe4a28
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions equate/src/equate.typ
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
}
}

show math.equation.where(block: true): set block(breakable: breakable) if type(breakable) == bool
show math.equation.where(block: true): it => {
// Allow a way to make default equations.
if it.has("label") and it.label == <equate:revoke> {
Expand All @@ -352,9 +353,6 @@
// Main equation number.
let main-number = counter(math.equation).get().first()

// Resolve breakable parameter.
let breakable = if breakable == auto { block.breakable } else { breakable }

// Resolve text direction.
let text-dir = if text.dir == auto {
if text.lang in (
Expand Down Expand Up @@ -426,7 +424,7 @@
state.update(_ => sub-numbering)

// Layout equation as grid to allow page breaks.
block(breakable: breakable, grid(
block(grid(
columns: 1,
row-gutter: par.leading,
..realign(lines).enumerate().map(((i, line)) => {
Expand Down

0 comments on commit dfe4a28

Please sign in to comment.