lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Punctuation spacing


From: Jeff Kingston
Subject: Re: Punctuation spacing
Date: Tue, 11 Apr 2006 09:27:17 +1100

> 
> At some point, I was hoping that we might be able to make those
> definitions visible only to, say, the body of address@hidden'.  But then, it
> is still visible to the arguments of all the functions used within the
> body of address@hidden'.
> 
> Is there no way to somehow limit the scope of those definitions?

Only when the functions have a body parameter (e.g. the right parameter
of @Eq is a body parameter), and only then in that body parameter, and
only by redefining the symbol to be something else.  As I say, too tricky.

> BTW, I couldn't find the explanation for the special-meaning `//' that
> must follow address@hidden', address@hidden', etc.  Is it documented 
> somewhere?

In the Expert's Guide under concatenation.

> As far as Lout is concerned, I can think of various possibilities.
> 
>   1. The broken `def's (what I proposed) that will inevitably yield
>      hard-to-understand errors from time to time.
> 
>   2. Definitions of `;' et al. with limited scope so that most erroneous
>      situations can be avoided.
> 
>   3. Per-language hard-wired C code.
> 
>   4. An extension of, say, `langdef', that allows everything we need to
>      be described.
> 
> ...
>
> What would you advise?

As you say, (2) is not achievable, but (3) and (4) have a problem too.
Let's suppose that somehow, by (3) or (4) or otherwise, we have been
able to explain to Lout that in certain languages, certain punctuation
characters have to trigger certain modifications, like extra space.
We still aren't out of the woods, because we then have the problem
of making sure that the right language is in force at every point.
Consider the case where some text contains an equation which itself
contains some text.  We would need to switch to language "equation"
as we enter the equation, to turn off the modifications, and switch
back to whatever language we were in before as we enter the included
text.  But by that time we have forgotten what that prior language was.

I would go for your suggestion (1).  At places where the definitions
are not wanted, people will have to enclose the affected punctuation
characters in double quotes.  When the right solution (explained in my
previous mail) is beyond Lout's limits, you have to compromise. the problem
of making sure that the right language is in force at every point.
Consider the case where some text contains an equation which itself
contains some text.  We would need to switch to language "equation"
as we enter the equation, to turn off the modifications, and switch
back to whatever language we were in before as we enter the included
text.  But by that time we have forgotten what that prior language was.

I would go for your suggestion (1).  At places where the definitions
are not wanted, people will have to enclose the affected punctuation
characters in double quotes.  When the right solution (explained in my
previous mail) is beyond Lout's limits, you have to compromise.

Jeff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]