fix(worksheets): update display options preview to use new problem-stack signature

Problem: Display options preview failed with "unexpected argument" error.

Root cause: Example route was calling problem-stack with old signature
that had individual digit parameters (aT, aO, bT, bO), but the function
was refactored to extract digits internally from full numbers.

Solution: Updated to new signature:
- Old: problem-stack(a, b, aT, aO, bT, bO, index, ...)
- New: problem-stack(a, b, index, show-carries, show-answers, ...)

Removed manual digit extraction and let the function handle it internally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-11-07 22:09:16 -06:00
parent c87499535a
commit 258b9ac1b4

View File

@@ -76,17 +76,13 @@ function generateExampleTypst(config: ExampleRequest): string {
${generateTypstHelpers(cellSize)}
${generateProblemStackFunction(cellSize)}
${generateProblemStackFunction(cellSize, 3)}
#let a = ${a}
#let b = ${b}
#let aT = calc.floor(calc.rem(a, 100) / 10)
#let aO = calc.rem(a, 10)
#let bT = calc.floor(calc.rem(b, 100) / 10)
#let bO = calc.rem(b, 10)
#align(center + horizon)[
#problem-stack(a, b, aT, aO, bT, bO, if show-numbers { 0 } else { none }, show-carries, show-answers, show-colors, show-ten-frames, show-numbers)
#problem-stack(a, b, if show-numbers { 0 } else { none }, show-carries, show-answers, show-colors, show-ten-frames, show-numbers)
]
`
}