polydiv directive#
The polydiv directive renders a polynomial long-division layout as an SVG figure. It supports step-by-step reveal and custom variable names.
Basic usage#
:::{polydiv}
:p: x^3 - 3x^2 + 1
:q: x - 1
:width: 80%
:::
Step-by-step reveal#
Use stage to show only the first n steps of the division:
:::{polydiv}
:p: x^3 - 3x^2 + 1
:q: x - 1
:stage: 2
:width: 80%
:::
Options#
Option |
Meaning |
Default |
|---|---|---|
|
Dividend polynomial |
(required) |
|
Divisor polynomial |
(required) |
|
Number of steps to reveal (0 = all) |
|
|
Variable name (e.g. |
|
|
Render inline (no figure wrapper) |
off |
|
CSS width |
— |
|
|
— |
|
Extra CSS classes |
— |
|
Stable anchor / reference name |
— |
|
Alt text |
— |
|
Force regeneration / enable caching |
— |