In-line Fraction with Horizontal Line
Cubist at aol.com
Cubist at aol.com
Tue Mar 7 06:43:27 CST 2006
In a message dated 3/6/06 6:57:10 PM, Mark Greenberg <markgreenberg at cox.net>
>Fellow list members, I have a problem for which I can only find
>difficult or unsatisfactory solutions, and I was hoping you might
>have some suggestions.
>I am making a stack to teach students math -- linear equations, to be
>more precise. When I display the y = mx + b form, the best I can do
>to show a fraction in the m position is something like y = 4/5x + 2.
>This is ambiguous because it isn't clear what should be taken as the
>divisor, 5 or 5x or 5x + 2. The math teacher for whom I am making
>the game would prefer a horizontal division line instead of a slash.
>So far this is what I've thought of and rejected:
>Use fonts that have fractions built in as one character. No, because
>they have too few for the range of possible slopes I want to generate.
[nods] Yep. It's possible for you to write your code so that the only
fractions that would show up are those which appear in a particular font... but
that's clearly *not* one of the better approaches.
>Force the numerals around as subscripts and superscripts until it is
>clear what the fraction is. Messy and probably won't lead to success.
Hmmm... maybe. The real question is, what would you do for the horizontal
>Use inline images. Need too many images to cover possible slopes.
Not necessarily! Remember, you can use the "snapshot" function to build
new images on the fly. Presumably, these images won't be particularly large, so
it's at least worth trying to see if it would be fast enough.
>Write it y = (4/5)x + 2. This is mathematically acceptable, but not
>the way the students will see it elsewhere.
[nods] You may or may not want to include this as an optional way to
display the equations. Other than that, fuggeddaboutit.
>Use a different 2-line field that moves according to the location of
>the fraction. Hmm.. maybe.
As long as you know (or can determine) where the fraction is going to be
displayed on the card, this is a more than adequate way to go.
More information about the use-livecode