[comp.text] Setting large slashed fractions with eqn

roy@phri.UUCP (02/04/87)

        I want to set the following fraction:

                     /
                    /   N     +---        --+ 2
                   /   ----   |      N!     |
              1   /    \      |  ---------- |
                 /     /      |   (N-n)!n!  |
                /      ----   +---       ---+
               /       n = 0

but the best I can come up with is:

        .EQ
        up 30 1 over
        { down 30 { sum from { n ^ = ^ 0} to N
        { { left [ N! over { (N-n)!n! } right ] } sup size +2 2 }
        } }
        .EN
                      X
which gives you the  --- form instead of the X / Y that I want (no comments
                      Y

about which is the "preferred" style, please).  The problem is that I can't
figure out how to get the large-sized "/" in eqn.  Is it possible, short of
doing something sick like "size 36 /"?

        BTW, withough the "up/down 30" commands, the numerator and
demoninator run right into the fraction bar.  Also, the superscript 2 comes
out too small unless I do the "size +2" stuff.  Is this because I did
something wrong or is it an intrinsic eqn problem?  Could it be badly
designed fonts?  I did this on an Apple LaserWriter, using Times and
Adobe's transcript package (i.e. ptroff).

        Presumably TeX has an easy way to do this; if somebody could show
we how to do it in TeX, without any religious flamage about TeX vs. troff,
I would appreciate that too.
-- 
Roy Smith, {allegra,cmcl2,philabs}!phri!roy
System Administrator, Public Health Research Institute
455 First Avenue, New York, NY 10016

"you can't spell deoxyribonucleic without unix!"

scott@tg.UUCP (02/08/87)

In article <2590@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
[equation picture deleted for space]
>but the best I can come up with is:
>
>        .EQ
>        up 30 1 over
>        { down 30 { sum from { n ^ = ^ 0} to N
>        { { left [ N! over { (N-n)!n! } right ] } sup size +2 2 }
>        } }
>        .EN
>                      X
>which gives you the  --- form instead of the X / Y that I want (no comments
>                      Y
Try this:
	.EQ
	up 30 1 ~ left "/" ~
        { down 30 { sum from { n ^ = ^ 0} to N
        { left [ N! over { (N-n)!n! } right ] } } right "" sup 2
        .EN

>        BTW, withough the "up/down 30" commands, the numerator and
>demoninator run right into the fraction bar.  Also, the superscript 2 comes
>out too small unless I do the "size +2" stuff.  Is this because I did
>something wrong or is it an intrinsic eqn problem?

Disclaimer: The 'left "/"' might be a something hacked into the version
of eqn I last looked at.  The code is so bad looking that it is
difficult to determine.  If it works, you have it.

The ~ move 1 em space while the ^ moves 1 en space.  So if more room is
needed, add more ~.  The  right ""  should solve the space problems with
the superscript.  This is not a bug since all superscripts are designed
to be (by default) 4 point sizes smaller than the text point size.  If
it doesn't work, add the size +2 again.

If this does not work, drop me an email note and we can arrange to talk
(I'm in NY).

Scott Barman
{philabs, pyrnj}!tg!scott