Wolfgang Schuster wrote:
On Mon, 18 Sep 2006 01:08:03 +0200 Vit Zyka
wrote: Dear Hans,
it seems to me that \shortsetup ignores cd:command with type="environment". Please see the next example:
----------------------------------------------------- \usemodule[set-11] \loadsetups
\starttext
page (OK): \shortsetup{page}
startframedtext (NOTHING): \shortsetup{startframedtext}
framedtext (NOTHING): \shortsetup{framedtext}
\stoptext ------------------------------------------------------
Vit
Not a problem with type="environment" but generated="yes".
You should the the following code in x-set-11.tex from
\defineXMLenvironmentsave [cd:command] [name=,type=,generated=,interactive=,variant=] {} {\doifelseXMLop{type}{environment} {\edef\currentSETUPname{start\getinterfacecomponent{string}{\XMLop{name}}}} {\edef\currentSETUPname{\getinterfacecomponent{string}{\XMLop{name}}}}% \doifsomething{\XMLop{variant}} {\edef\currentSETUPname{\currentSETUPname:\XMLop{variant}}}% like setupinterlinespace:1 \doifXMLop{generated}{yes} {\edef\currentSETUPname{\currentSETUPname*}}% \doglobal\saveXMLdatainelement{stp:\currentSETUPname}{cd:command}{cd:command}% \expanded{\eachtexcommand[stp:x:\currentSETUPname]{\currentSETUPname}}% \expanded{\texcommand [stp:y:\currentSETUPname]{\currentSETUPname}}}
to
\defineXMLenvironmentsave [cd:command] [name=,type=,generated=,interactive=,variant=] {} {\doifelseXMLop{type}{environment} {\edef\currentSETUPname{start\getinterfacecomponent{string}{\XMLop{name}}}} {\edef\currentSETUPname{\getinterfacecomponent{string}{\XMLop{name}}}}% \doifsomething{\XMLop{variant}} {\edef\currentSETUPname{\currentSETUPname:\XMLop{variant}}}% like setupinterlinespace:1 %\doifXMLop{generated}{yes} % {\edef\currentSETUPname{\currentSETUPname*}}%
Ohh, I see, thank you Wolfgang. I have overlooked the star. I think everything is OK, only the star should be removed. The redefinition is for expansion. Isn't it?
\doglobal\saveXMLdatainelement{stp:\currentSETUPname}{cd:command}{cd:command}% \expanded{\eachtexcommand[stp:x:\currentSETUPname]{\currentSETUPname}}% \expanded{\texcommand [stp:y:\currentSETUPname]{\currentSETUPname}}}
Look at the %-signs.
I hope Hans will add something like \setupsetup[generated=yes|no] with generated=no as default to be backward compatible.
Until Hans will include such a patched file you can use my attached one with \usemodule[t-set-11].
For Hans! Shouldn't the "start" in the definition be a "\e!start"
I agree.
\defineXMLenvironmentsave [cd:command] [name=,type=,generated=,interactive=,variant=] {} {\doifelseXMLop{type}{environment} {\edef\currentSETUPname{start\getinterfacecomponent{string}{\XMLop{name}}}} ----- \e!start
With current code the command name is typeset by uppercase, like \startFRAMEDTEXT Is this intended? In my opinion it confuses the user. I would redefine \defineXMLenvironmentsave [cd:variable] [value=] {{\expanded{\setupintfont{% \getinterfacecomponent{variable}{\XMLop{value}}}}}\ignorespaces} {\ignorespaces} to \defineXMLenvironmentsave [cd:variable] [value=] {{\expanded{% \getinterfacecomponent{variable}{\XMLop{value}}}}\ignorespaces} {\ignorespaces} Vit