factor-tree directive#
The factor-tree directive generates a factor-tree figure for a given integer, showing its prime factorisation as a tree structure.
Basic usage#
```{factor-tree}
:n: 84
:width: 70%
```
Syntax overview#
The integer to factorize is specified with the :n: option. The figure is rendered as an inline SVG.
Options#
Option |
Meaning |
Default |
|---|---|---|
|
The integer to factorize |
(required) |
|
CSS width (e.g. |
— |
|
|
— |
|
Angle between branches (degrees) |
auto |
|
Length of tree branches |
auto |
|
Font size for numbers |
auto |
|
Matplotlib figure size, e.g. |
auto |
|
Figure width |
— |
|
Figure height |
— |
|
Extra CSS classes |
— |
|
Stable anchor / reference name |
— |
|
Alt text for accessibility |
— |
|
Force regeneration |
— |
|
Keep debug output |
— |