Skip to content

Commit 11b18e5

Browse files
committed
Fix #13
1 parent 9673f40 commit 11b18e5

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

tests/sample-book/ref19.png

-24 Bytes
Loading

typst-orange.typ

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -173,22 +173,17 @@
173173
set par(leading: 0.5em)
174174
set enum(numbering: "1.a.i.")
175175
set list(marker: ([•], [--], [◦]))
176-
// show math.equation.where(block: true): e => {
177-
// counter(math.equation).step()
178-
// locate(loc => {
179-
// pad(left: 3em, box({
180-
// box(e)
181-
// h(1fr)
182-
// "(" + str(counter(heading).at(loc).at(0)) + "." + str(counter(math.equation).at(loc).first()) + ")"
183-
// }))
184-
// })
185-
// }
186-
set math.equation(numbering: (..nums) => {
187-
locate(loc => {
188-
"(" + str(counter(heading).at(loc).at(0)) + "." + str(nums.pos().first()) + ")"
176+
show math.equation.where(block: true): e => {
177+
counter(math.equation).step()
178+
locate(loc => {
179+
pad(left: 1cm, {
180+
box(baseline: 50%, e)
181+
h(1fr)
182+
box(baseline: 50%, "(" + str(counter(heading).at(loc).at(0)) + "." + str(counter(math.equation).at(loc).first()) + ")")
189183
})
190-
191-
},)
184+
})
185+
}
186+
192187
set page(
193188
paper: "a4",
194189
margin: (x: 3cm, bottom: 2.5cm, top: 3cm),

0 commit comments

Comments
 (0)