[dev-context] shortsetup and environment
Wolfgang Schuster
schuster.wolfgang at googlemail.com
Tue Sep 19 12:42:33 CEST 2006
On Mon, 18 Sep 2006 01:08:03 +0200
Vit Zyka <vit.zyka at seznam.cz> 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*}}%
\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"
\defineXMLenvironmentsave [cd:command] [name=,type=,generated=,interactive=,variant=]
{}
{\doifelseXMLop{type}{environment}
{\edef\currentSETUPname{start\getinterfacecomponent{string}{\XMLop{name}}}}
-----
\e!start
Wolfgang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t-set-11.tex
Type: text/x-tex
Size: 22974 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/dev-context/attachments/20060919/03df9228/attachment.tex>
More information about the dev-context
mailing list