lout-users
[Top][All Lists]
Advanced

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

Re: Quotes


From: Jeff Kingston
Subject: Re: Quotes
Date: Fri, 21 Sep 2001 10:16:36 +1000

On Thu, 20 Sep 2001 20:30:43 +0200, Giovanni Salmeri wrote:
  > 
  > In Italian ``x'' is much more common than ``x,,. The first choice is
  > however «x». It would be very nice to specify different quotes for the
  > various level of embedding (two would suffice), as in the 'quotes'
  > property in CSS2. But I don't know if this is possible in Lout!

Again, I wonder about the utility of this - why not just type the quotes
you want at the place you want them?  I know, because separating content
from markup is a Good Thing - to which I say only up to the point where
layout becomes content.

However, you can do it but only by commandeering (say) the y unit or
z unit of the style information and changing that.  Similar things
have been done in equations (squashing the spacing inside root signs
etc.) and syntax diagrams (direction of diagram depends on context).
Here is how I did it for syntax diagrams; the aim there was to encode
four directions (up, down, left, right) in the ZUnit style variable,
which was originally designed to hold a length:

        macro @Right    { "1p" }
        macro @Up       { "2p" }
        macro @Left     { "3p" }
        macro @Down     { "4p" }

        macro @CurrDirection { @CurrZUnit }

        def @GoRight right x { @Right @ZUnit x }
        def @GoUp    right x { @Up    @ZUnit x }
        def @GoLeft  right x { @Left  @ZUnit x }
        def @GoDown  right x { @Down  @ZUnit x }

        def @GoReverse right x
        {
            @CurrDirection @Case {
                @Right @Yield @GoLeft x
                @Up    @Yield @GoDown x
                @Left  @Yield @GoRight x
                @Down  @Yield @GoUp x
            }
        }

For quotes you want to encode the level mod 4 but the principle is the
same.  It's clumsy, Lout really needs user-definable style variables,
but there it is.

Jeff






reply via email to

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