From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30920 Path: news.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: [dev-context] shortsetup and environment Date: Wed, 20 Sep 2006 19:54:55 +0200 Message-ID: <4511806F.6070002@seznam.cz> References: <450DD553.1070700@seznam.cz> <20060919124233.9f81db13.schuster.wolfgang@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1158774934 22575 80.91.229.2 (20 Sep 2006 17:55:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Sep 2006 17:55:34 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 20 19:55:30 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GQ6Ht-0003Sv-0x for gctc-ntg-context-518@m.gmane.org; Wed, 20 Sep 2006 19:55:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6F7DA1FE05; Wed, 20 Sep 2006 19:55:07 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 27866-03; Wed, 20 Sep 2006 19:54:59 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8D8921FDEC; Wed, 20 Sep 2006 19:54:58 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1DC9F1FDEC for ; Wed, 20 Sep 2006 19:54:55 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 27013-06-5 for ; Wed, 20 Sep 2006 19:54:47 +0200 (CEST) Original-Received: from smtp.seznam.cz (smtp.seznam.cz [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id 7CAD01FDE9 for ; Wed, 20 Sep 2006 19:54:46 +0200 (CEST) Original-Received: (qmail 25634 invoked from network); 20 Sep 2006 17:54:40 -0000 Original-Received: from unknown (HELO ?127.0.0.1?) (typokvitek@seznam.cz@82.208.57.182) by cetus.go.seznam.cz with ESMTPA; 20 Sep 2006 17:54:40 -0000 X-Seznam-User: typokvitek@seznam.cz User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: Wolfgang Schuster , ConTeXt In-Reply-To: <20060919124233.9f81db13.schuster.wolfgang@googlemail.com> X-Antivirus: avast! (VPS 0638-0, 19.09.2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:30920 Archived-At: 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