TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 clemens, 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 :-/ – 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.

Sample output





share|improve this answer

Maybe the xlop package is what you want:




enter image description here

share|improve this answer

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