Re: user def symbols for use in @Eq - misbehaving!
Martin Senft <[email protected]>
| Newsgroups | gmane.comp.type-setting.lout |
|---|---|
| Message-ID | <CAP=7od5skh_5+hj4pN45mi5SpW=fwmt+GyKjt_EqZs+TT-vOnw@mail.gmail.com> |
2011/12/27 Daren Scot Wilson <[email protected]>: > What are the limitations on what a user defined symbol can contain? I think > I am running into some obstacle. > > > In mydefs I have written > > def @opone {times} > > > In the lout source file there is: > > @Eq {x @opone y = x times y } > > The final output, converted to PDF, shows > > xtimesy = x в y > > (In case the unicode doesn't survive the mailing list system: on the right > hand side there's a letter x, the times symbol which looks like a plain > geometric x, then the letter y) The "times" works find directly in an @Eq, > but not if given as a user defined symbol. > > Why is the @opone symbol not working? > > Lout ran without showing any error messages. There are other similar > definitions in mydefs that work fine. (The problem reported in the previous > message was "solved" by commenting out lots of stuff temporarily. I still > need to resolve that.) > > I tried some simple variations, speculating that some subtle ambiguities > were involved, but there's no change. > def @opone { times } > def @opone {{times}} > > > -- > Daren Scot Wilson > Escondido California > http://www.darenscotwilson.com This issue looks like a forgotten "import @Eq" or "extend @Eq" in the definition of @opone. Without this line, there is no symbol "times" defined when Lout finds and evaluates "def @opone { times }" and thus "times" is just a word. Also, I believe that @Eq is deprecated and @Math is recommended for new projects. Martin Senft