[Tex/LaTex] Displaying the complete Long division

displaystyleformattingmath-mode

I want to display a long division procedure as illustrated. enter image description here

I did search but couldn't find what I'm looking for. Any help is much appreciated.

Best Answer

With the package longdivision, you obtain almost the desired output (but as a French, I don't known this strange notation, see the documentation of the package xlop about division for the French notation).

\documentclass{article}
\usepackage{longdivision}
\begin{document}
    \intlongdivision{12345}{13}
\end{document}

enter image description here