Hi, why does \startchemical take the name of a instance as argument (e.g. \startchemical[important]) when there is no way to create it because \definechemical is redefined and the original version isn’t saved. Even \setupchemical[important][..,..=..,..] can’t be used because it doesn’t resolve the parent setting. Wolfgang
On Tue, 18 Aug 2015 19:42:20 +0200
Wolfgang Schuster
why does \startchemical take the name of a instance as argument (e.g. \startchemical[important]) when there is no way to create it because \definechemical is redefined and the original version isn’t saved.
Even \setupchemical[important][..,..=..,..] can’t be used because it doesn’t resolve the parent setting.
I did not realize that \startchemical took the name of an instance as argument - I have only used it with key=value, i.e.: \startchemical[...=...] I suppose that it uses some "standard" mechanisms. \definechemical[benzene] is different. It gets used as: \startchemical \chemical[benzene,...] \stopchemical Perhaps there is some inconsistency with respect to ConTeXt syntax here. Alan
Alan BRASLAU mailto:alan.braslau@cea.fr 18. August 2015 20:01 On Tue, 18 Aug 2015 19:42:20 +0200
I did not realize that \startchemical took the name of an instance as argument - I have only used it with key=value, i.e.: \startchemical[...=...]
I suppose that it uses some "standard" mechanisms. There are helper commands for the default \define and \setup macros but the allowed arguments for \start... depend only on the way how you write it. \definechemical[benzene] is different. It gets used as:
\startchemical \chemical[benzene,...] \stopchemical
Perhaps there is some inconsistency with respect to ConTeXt syntax here. There are other commands which redefine the generated \define-command but normally it is saved before the redefintion and the problem here is that you can’t pass a instance because it can’t be created.
Wolfgang
On 8/18/2015 8:01 PM, Alan BRASLAU wrote:
On Tue, 18 Aug 2015 19:42:20 +0200 Wolfgang Schuster
wrote: why does \startchemical take the name of a instance as argument (e.g. \startchemical[important]) when there is no way to create it because \definechemical is redefined and the original version isn’t saved.
Even \setupchemical[important][..,..=..,..] can’t be used because it doesn’t resolve the parent setting.
I did not realize that \startchemical took the name of an instance as argument - I have only used it with key=value, i.e.: \startchemical[...=...]
I suppose that it uses some "standard" mechanisms.
\definechemical[benzene] is different. It gets used as:
\startchemical \chemical[benzene,...] \stopchemical
Perhaps there is some inconsistency with respect to ConTeXt syntax here.
the issue is that we have definechemical doing something different (compatibility) but we can do this: in chem-str.mkiv: % \installsimplecommandhandler \??chemical {chemical} \??chemical % no \define... \installcommandhandler \??chemical {chemical} \??chemical % no \define... \let\setupchemicals \setupchemical \let\definechemicals\definechemical then we can do: \starttext \definechemicals[foo][axis=on] \startchemical[foo] \chemical[SIX,ROT2,B,R6,SUB1,FIVE,ROT1,B][1] \stopchemical \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Alan BRASLAU
-
Hans Hagen
-
Wolfgang Schuster