Re: Adding a custom symbol

Mark Summerfield <[email protected]>
Newsgroups gmane.comp.type-setting.lout
Organization Qtrac Ltd.
Message-ID <20120116093302.36b24d2f@dino>
Hi Uwe,

On Fri, 13 Jan 2012 21:55:12 +0400
"Valeriy E. Ushakov" <[email protected]> wrote:
[snip]
> Ok, got around to actually test it:
> 
> @SysInclude { doc }
> 
> export @Monochrome
> def @MyOptions
>   named @Monochrome { No }
> {}
> 
> @Use { @MyOptions }
> 
> @Doc @Text @Begin
> @LP Monochrome is @Monochrome
> @End @Text
> 
> 
> $ lout -p -s override.lt | uniq
> 
>           Monochrome is No
> 
> $ lout -p -s --'@Monochrome{Yes}' override.lt | uniq
> 
>           Monochrome is Yes

I did this and put lines like this in my document:

    @CD @Monochrome @Case {
    Yes @Yield @IncludeGraphic{"images/quadratic2-linux-bw.eps.gz"}
    else @Yield @IncludeGraphic{"images/quadratic2-linux.eps.gz"}
    }

This gave no error messages but didn't work reliably.

So I changed them to this:

    @CD @Monochrome @Case {
    Yes @Yield @IncludeGraphic{"images/quadratic2-linux-bw.eps.gz"}
    No @Yield @IncludeGraphic{"images/quadratic2-linux.eps.gz"}
    }

This seems to work reliably but outputs some strange error messages (but
only in the --'@Monochrome{Yes}' case:

    replacing unknown @Case option ?? by Yes

Anyway, it works, so that you very much:-)

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Programming in Go" - ISBN 0321774639
            http://www.qtrac.eu/gobook.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.