2
\documentclass[12pt]{article}

\pagestyle{empty}

\begin{document}

$$
\begin{array}{cccccccc}
& & & 1 & 0 & 9 & 8 & 9 \\
13 & ) & 1 & 4 & 2 & 8 & 5 & 9 \\
& & 1 & 3 \\  \\
& & & 1 & 2 \\
& & &   & 0 \\  \\
& & & 1 & 2 & 8 \\
& & & 1 & 1 & 7 \\  \\
& & &   & 1 & 1 & 5 \\
& & &   & 1 & 0 & 4 \\  \\
& & &   &   & 1 & 1 & 9 \\
& & &   &   & 1 & 1 & 7 \\  \\
& & &   &   &   &   & 2
\end{array}
$$

\end{document}

We all learned in elementary school how to do long division. In standard usage one draws a horizontal line beginning at the top of the right parenthesis and underlining the digits in the quotient, but ending there rather than crossing the whole page; then one underlines the digits of each of the numbers being subtracted, again not extending the underline across the page, nor even across the whole width of the displayed mathematical notation.

I don't know how to make an underline crossing alignment tabs but underlining only the digits rather than extending across the whole width.

How can that be done? Whoever typesets books on arithmetic must have some way to do that.

David Carlisle
  • 757,742
  • 1
    \cline{2-5} makes a line under columns 2 to 5 – David Carlisle Jan 21 '15 at 15:45
  • 2
    How about this answer: http://tex.stackexchange.com/a/49230/1402 – Matthew Leingang Jan 21 '15 at 15:48
  • 1
  • @DavidCarlisle : I just tried \cline{3-4}, and it makes a line over those columns. And the space between the line and the stuff under it is uncomfortably small. Will something else make a reasonably positioned line under those columns? – Michael Hardy Jan 22 '15 at 00:17
  • @MichaelHardy Can you draw a picture of what you want? Or paste a screenshot from some book. I do not understand it. You can set your \cline{3-4} behind each row of your array, so there is no problem for under and over. Why do you want a line of just two columns here? – LaRiFaRi Jan 22 '15 at 08:34
  • @LaRiFaRi : Look at pages 200 through 203 of this book: https://books.google.com/books?id=Ntjq07-FA_IC&pg=PA199&dq=arithmetic+long+division&hl=en&sa=X&ei=LkbBVP2tIceQyASi4IL4AQ&ved=0CCgQ6AEwAg#v=onepage&q=arithmetic%20long%20division&f=false – Michael Hardy Jan 22 '15 at 18:52
  • @LaRiFaRi: Schriftliches Dividieren wie in der Schule ;-) –  Jan 22 '15 at 21:45
  • @ChristianHupfer never have seen it with that bracket. But I guess, there have been enough good links in comments. – LaRiFaRi Jan 22 '15 at 21:53
  • @LaRiFaRi: Nor have I... other countries other styles .... –  Jan 22 '15 at 21:56

1 Answers1

4

You want to do it hard way?. Use xlop

\documentclass[12pt]{article}

\usepackage{xlop}

\begin{document}
\opdiv[displayintermediary=all,voperation=top]
{142859}{13}

\end{document}

enter image description here