# Is there a long division macro? [duplicate]

I want to do regular long division in latex. See also: http://en.wikipedia.org/wiki/Long_division

Is there a latex macro for this ?

Edit: I actually want to use it in mathjax, is this possible ?

-

## marked as duplicate by clemens, lockstep, Stefan Kottwitz♦Feb 25 '13 at 12:44

I don't think that any LaTeX packages work in MathJaX until its developers wrapped them there :-/ – yo' Feb 25 '13 at 12:04
See also Decimal Long Division from the "Related" bar. – Hendrik Vogt Feb 25 '13 at 12:05
To be clear, you want some software that takes two parameters (the input numerator and denominator), and turns out an HTML representation of the long division that will look right when it occurs on a page with Mathjax enabled? – Charles Stewart Feb 25 '13 at 12:37
there is a mathjax compatible longdiv generator here: dpcarlisle.blogspot.co.uk/2012/10/mathml-long-division.html – David Carlisle Feb 26 '13 at 13:06

There is longdiv, which is loaded with \input not \usepackage, as it is not LaTeX specific.

\documentclass{article}

\input{longdiv}

\begin{document}

\longdiv{6000}{34}

\end{document}

-

Maybe the xlop package is what you want:

\documentclass{article}
\usepackage{xlop}

\begin{document}
\opdiv{6000}{34}

\opdiv[maxdivstep=3]{6000}{34}
\end{document}


-