Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

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 ?

share|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I don't think that any LaTeX packages work in MathJaX until its developers wrapped them there :-/ –  tohecz Feb 25 '13 at 12:04
1  
See also Decimal Long Division from the "Related" bar. –  Hendrik Vogt Feb 25 '13 at 12:05
1  
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
1  
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
add comment

2 Answers

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

Sample output

\documentclass{article}

\input{longdiv}

\begin{document}

\longdiv{6000}{34}

\end{document}
share|improve this answer
add comment

Maybe the xlop package is what you want:

\documentclass{article}
\usepackage{xlop}

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

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

enter image description here

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.