Line Length Problems

 

How do I handle lines that run on too long? Some solutions:

 

Horizontal Scrolling

This is the conventional solution. I hate it. It won't happen in my program.

 

Line Wrap

This is the second most obvious way. The problem is figuring the line breaks. Sure, I can break on words, but I could break expressions up in all the wrong ways. Who wants that? I don't like this solution.

 

Automatic substitution

This is the most ambitious idea. The code would scan the text line to determine if it's too long (using a straight character count). If so, the code then examines the token arguements to find natural breaks in the equation, and substitutes intermediate variables for these automatically. Thus, intermediate variables are not under the control of the storybuilder and in fact don't really exist in the token string. They exist only on the screen. The problem that frightens me is, am I certain that the storybuilder can edit these things, or will I have to come up with an even more convoluted mapping scheme? And what about nested intermediate variables? Will that work?

 

I like this idea &emdash; a lot. But I'm not sure I can make it work.