I want to add spaces before and after the numerator and denominator to make the fraction bar longer. Below is the script I tried writing, but apparently there’s an error because of a circular reference. How to overwrite the defition of frac?
Script
#let AddSpacefrac(num, den) = math.frac(
[#h(1em /6) #num #h(1em /6)],
[#h(1em /6) #den #h(1em /6)],
)
#show math.frac: frac => {
AddSpacefrac(frac.num, frac.denom)
}
Error message
maximum show rule depth exceeded
Hint: check whether the show rule matches its own output```