fix: use numeric cellSize for borrow box sizing in hints
Change from cellSizeIn * 0.7 (which produces NaN since cellSizeIn is a string) to cellSize * 0.7 with unit added inline. This fixes the Typst compilation error when borrowing hints are enabled.
This commit is contained in:
parent
89b8f98662
commit
cc54176cb1
|
|
@ -450,9 +450,9 @@ export function generateSubtractionProblemStackFunction(
|
|||
],
|
||||
// Show the borrow box
|
||||
if show-colors {
|
||||
diagonal-split-box(${cellSizeIn * 0.7}, source-color, dest-color)
|
||||
diagonal-split-box(${(cellSize * 0.7).toFixed(2)}in, source-color, dest-color)
|
||||
} else {
|
||||
box(width: ${cellSizeIn * 0.7}, height: ${cellSizeIn * 0.7}, stroke: 0.5pt)[]
|
||||
box(width: ${(cellSize * 0.7).toFixed(2)}in, height: ${(cellSize * 0.7).toFixed(2)}in, stroke: 0.5pt)[]
|
||||
}
|
||||
)
|
||||
],)
|
||||
|
|
|
|||
Loading…
Reference in New Issue