1

Due to odd circumstances, I need to present long division manually (in math mode). That is, without using a macro. Moreover, I cannot use \multicolumn or \cline. Normally, I would do:

\[
\begin{array}{cccc}
& 0. & 7 & 5 \\ \cline{2-4}
\multicolumn{1}{c|}{4} & 3. & 0 & 0 \\
& 2. & 8 & \\ \cline{2-3}
& & 2 & 0 \\
& & 2 & 0 \\ \cline{3-4}
& & & 0
\end{array}
\]

but is there a way to obtain similar results without \multicolumn or \cline? I'm also open to options using asymptote.

I'm not looking for a generator as they don't insert a 0 when the divisor does not go into the dividend. I'd like a manual way of doing this that looks half-way decent.

  • An explanation for why this breaks would be nice too! – Paul Elfish Dec 20 '13 at 04:42
  • 1
    @Close Voters: I would say just an edit is needed. A solution for this that works in LaTeX would (likely) work with MathJax as well. – Sean Allred Dec 20 '13 at 05:25
  • 2
    MathJax questions are generally considered off topic, but this one is a duplicate, anyway: Is there a long division macro? – Alan Munn Dec 20 '13 at 05:28
  • 1
    The duplicate questions get TeX answers (this is a TeX forum) but for something that works with mathjax you could look at http://dpcarlisle.blogspot.co.uk/2012/10/mathml-long-division.html – David Carlisle Dec 20 '13 at 11:03
  • @moderators: I edited as the duplicates did not answer my question. And if MathJax is off-topic, please consider removing the tag and closing other MathJax questions as well. – Paul Elfish Dec 20 '13 at 17:07
  • 1
    Answer's to the question @AlanMunn points to need not, and in fact are not, answers to this question. I regard Mathjax markup questions as on topic for this site (as opposed to ones about installation, or problems with this or that browser), so I've voted to reopen. – Charles Stewart Dec 20 '13 at 17:23
  • 1
    Cf. http://meta.tex.stackexchange.com/questions/272/how-do-we-feel-about-mathjax-jsmath-other-spin-offs/2378#2378 - my opinion is pretty much what Martin Scharrer said there. – Charles Stewart Dec 20 '13 at 17:26
  • @CharlesStewart Reopened, now what ? :-P – percusse Dec 21 '13 at 09:19
  • I'm really not sure this can be regarded as on topic. I see no way to do what's desired without \multicolumn and \cline on the TeX side. Unfortunately, MathJax doesn't understand them. So what? This should go to a MathJax forum, because it isn't connected to TeX in any way. – egreg Dec 21 '13 at 10:56
  • @moderators: Reworded to remove any reference to MathJax. – Paul Elfish Dec 21 '13 at 19:00
  • @percusse - I would have said, put up an answer saying that Mathjax didn't seem able to support this within native Latex idiom, but now the question is different, and closed. At least off-topic is a better close reason than duplicate. – Charles Stewart Dec 22 '13 at 17:18

1 Answers1

3

A feasible representation:

$$
\begin{array}{r}
      \underline{0.75} \\[-2pt]
  4 | 3.00 \\
      \underline{2.8\phantom{0}} \\
        20 \\
        \underline{\phantom{0.}20} \\
         0
\end{array}
$$

as rendered on Math.SE:

enter image description here

Werner
  • 603,163