ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setups on framed
@ 2011-04-20 10:35 Reviczky, Adam
  2011-04-20 15:59 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Reviczky, Adam @ 2011-04-20 10:35 UTC (permalink / raw)
  To: ntg-context

Hi

As a follow-up to this:
http://www.ntg.nl/pipermail/ntg-context/2011/058569.html

I was wondering if it is possible to something like this:

\startsetups test
\setupframed[frame=off,topframe=on,leftframe=on]
\stopsetups
\starttext
\framed[setups=test]{A fancy title}
\stoptext

Adam


PS: I am aware of defineframed, but I don't want a new "command", I want to use different setups on exisiting framed elements.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: setups on framed
  2011-04-20 10:35 setups on framed Reviczky, Adam
@ 2011-04-20 15:59 ` Wolfgang Schuster
  2011-04-20 16:09   ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2011-04-20 15:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 20.04.2011 um 12:35 schrieb Reviczky, Adam:

> Hi
> 
> As a follow-up to this:
> http://www.ntg.nl/pipermail/ntg-context/2011/058569.html
> 
> I was wondering if it is possible to something like this:
> 
> \startsetups test
> \setupframed[frame=off,topframe=on,leftframe=on]
> \stopsetups
> \starttext
> \framed[setups=test]{A fancy title}
> \stoptext

\framed[extras=\setup{test}]{…}

but you can’t change all values because the hook is called to late.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: setups on framed
  2011-04-20 15:59 ` Wolfgang Schuster
@ 2011-04-20 16:09   ` Aditya Mahajan
  2011-04-20 17:45     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2011-04-20 16:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 768 bytes --]

On Wed, 20 Apr 2011, Wolfgang Schuster wrote:

>
> Am 20.04.2011 um 12:35 schrieb Reviczky, Adam:
>
>> Hi
>>
>> As a follow-up to this:
>> http://www.ntg.nl/pipermail/ntg-context/2011/058569.html
>>
>> I was wondering if it is possible to something like this:
>>
>> \startsetups test
>> \setupframed[frame=off,topframe=on,leftframe=on]
>> \stopsetups
>> \starttext
>> \framed[setups=test]{A fancy title}
>> \stoptext
>
> \framed[extras=\setup{test}]{…}
>
> but you can’t change all values because the hook is called to late.

Another approach:

\unprotected\getparameters[defaultoptions][frame=off,topframe=on,leftframe=on,parent=\??ol]

\setupframed[framecolor=green]

\starttext
\framed[parent=defaultoptions]{test}
\stoptext

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: setups on framed
  2011-04-20 16:09   ` Aditya Mahajan
@ 2011-04-20 17:45     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2011-04-20 17:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 20.04.2011 um 18:09 schrieb Aditya Mahajan:

> Another approach:
> 
> \unprotected\getparameters[defaultoptions][frame=off,topframe=on,leftframe=on,parent=\??ol]
> 
> \setupframed[framecolor=green]
> 
> \starttext
> \framed[parent=defaultoptions]{test}
> \stoptext


The parent setting is nothing you should care about on the user side.

BTW: here is my alternative:

\presetlocalframed[defaultoptions]
\copylocalframed[myoptions][defaultoptions]

\getparameters[defaultoptions][framecolor=green]
\getparameters[myoptions][frame=off,topframe=on,leftframe=on]

\starttext
\localframed[myoptions]{test}
\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-20 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-20 10:35 setups on framed Reviczky, Adam
2011-04-20 15:59 ` Wolfgang Schuster
2011-04-20 16:09   ` Aditya Mahajan
2011-04-20 17:45     ` Wolfgang Schuster

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).