[OS X TeX] Division into
Alain Schremmer
Schremmer.Alain at verizon.net
Wed Sep 8 22:37:30 EDT 2004
Couldn't resist and found what controls the lenght of the lines.
Thanks again.
Regards
--schremmer
Alain Schremmer wrote:
> I didn't have time but could not resist trying:
>
> \newdimen\digitwidth \settowidth\digitwidth{0}
> \def~{\hspace{\digitwidth}}
> \def\divrule#1#2{%
> \noalign{\moveright#1\digitwidth%
> \vbox{\hrule width#2\digitwidth}}}
> 3\,\begin{tabular}[b]{@{}r@{}} 2 \\ \hline
> \big)
> \begin{tabular}[t]{@{}l@{}}
> 8 \\
> 6 \\ \divrule{0}{4}
> 2 \\
> % ~~52 \\ \divrule{2}{3}
> % ~~125 \\
> % ~~117 \\ \divrule{2}{3}
> % ~~~~8
> \end{tabular}
> \end{tabular}
>
> I have no idea of the syntax involved but it almost worked. I mean it
> worked perfectly except that some of the lines are a bit too long. I
> am sure, though, that upon my return Monday night, I will be able to
> take care of that.
>
> So, a BIG, BIG thank.
>
> Regards
> --schremmer
>
> P. S. I have no idea how to use Arseeau' macro but I will study the
> thing upon my return. Just for the hell of it as, in any case, the
> code you gave is all I need. So I am entirely happy.
>
>
>
>
> Matthew Hills wrote:
>
>>
>> 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>
>>
>>
>>
> --------------------- 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>
>
>
>
--------------------- 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 MacOSX-TeX
mailing list