[OS X TeX] Division into

Matthew Hills hills_tex at tina.stanford.edu
Thu Sep 9 00:37:06 CEST 2004


On Sep 8, 2004, at 2:30 PM, Alain Schremmer wrote:

> I don't require that the vertical line be curved--although I wouldn't  
> mind if it did but I would like it to connect with the horizontal one.
> When I tried

Have you tried Donald Arseneau's longdiv macro?

http://mechanics.civil.tohoku.ac.jp/~bear/bear-collections/style-files/ 
longdiv.sty

(e.g., you can enter: "\longdiv{8}{3}" to get the complete calculation
inserted.)

It produces results similar to the raw TeX below (from an old Tugboat):

  \newdimen\digitwidth \settowidth\digitwidth{0}
  \def~{\hspace{\digitwidth}}
\def\divrule#1#2{%
\noalign{\moveright#1\digitwidth%
\vbox{\hrule width#2\digitwidth}}}
  13\,\begin{tabular}[b]{@{}r@{}} 949 \\ \hline
          \big)
          \begin{tabular}[t]{@{}l@{}}
            12345 \\
            117 \\ \divrule{0}{4}
            ~~64 \\
            ~~52 \\ \divrule{2}{3}
            ~~125 \\
            ~~117 \\ \divrule{2}{3}
            ~~~~8
            \end{tabular}
            \end{tabular}




--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list