ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Vit Zyka <vit.zyka@seznam.cz>
Subject: Re: [dev-context] shortsetup and environment
Date: Wed, 20 Sep 2006 19:54:55 +0200	[thread overview]
Message-ID: <4511806F.6070002@seznam.cz> (raw)
In-Reply-To: <20060919124233.9f81db13.schuster.wolfgang@googlemail.com>

Wolfgang Schuster wrote:
> On Mon, 18 Sep 2006 01:08:03 +0200
> Vit Zyka <vit.zyka@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*}}%

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

           reply	other threads:[~2006-09-20 17:54 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20060919124233.9f81db13.schuster.wolfgang@googlemail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4511806F.6070002@seznam.cz \
    --to=vit.zyka@seznam.cz \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).