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:
Thomas Hallock 2025-11-08 06:29:12 -06:00
parent 89b8f98662
commit cc54176cb1
1 changed files with 2 additions and 2 deletions

View File

@ -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)[]
}
)
],)