I generally am fine with using the \polylongdiv{<dividend>}{<divisor>}
macro from the polynom
package:
but I was wondering,
How do I programmatically typeset Polynomial Long Division with connected parenthesis and line? (Possibly using TikZ)
Similar to this TeX.SX answer
but also programmatically typeset the whole division process like \polylongdiv
and preferably make the parenthesis curve look centered(?) with respect to the divisor and flush left the quotient result on top / align with the leading coefficient of the divisor.
How can I achieve and define this, let's say, \mypolylongdiv{<dividend>}{<divisor>}
macro? Thank you.