ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \framedparameter
@ 2010-01-04 13:04 Wolfgang Schuster
  2010-01-04 16:28 ` \framedparameter Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2010-01-04 13:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans,

in MkII the following is possible without problems:

\setupcolors[state=start]

\startuseMPgraphic{frameborder}
drawoptions(withcolor \MPcolor{\framedparameter{framecolor}}) ;
draw topboundary    OverlayBox withpen pencircle scaled \the\dimexpr\framedparameter{toprulethickness}\relax    ;
draw bottomboundary OverlayBox withpen pencircle scaled \the\dimexpr\framedparameter{bottomrulethickness}\relax ;
draw leftboundary   OverlayBox withpen pencircle scaled \the\dimexpr\framedparameter{leftrulethickness}\relax   ;
draw rightboundary  OverlayBox withpen pencircle scaled \the\dimexpr\framedparameter{rightrulethickness}\relax  ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic

\defineoverlay[frameborder][\useMPgraphic{frameborder}]

\defineframed
 [mpframed]
 [   toprulethickness=\framedparameter{rulethickness},
  bottomrulethickness=\framedparameter{rulethickness},
    leftrulethickness=\framedparameter{rulethickness},
   rightrulethickness=\framedparameter{rulethickness},
           background=frameborder]

\starttext
\mpframed[width=4cm,height=4cm,toprulethickness=1pt,framecolor=red]{text}
\stoptext

In MkIV this is no longer possible because \framedparameter accepts only protected keys (e.g. \c!rulethickness)
and on the fly key-value-pairs like 'toprulethickness=\framedparameter{rulethickness}' are also useless because
you need now \c!toprulethickness to use the value in another command like metapost graphics.

Can you provide a mechanism to access these values again on the user side, e.g. \userparameter{framed:toprulethickness}.

Best regards,
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] 3+ messages in thread

* Re: \framedparameter
  2010-01-04 13:04 \framedparameter Wolfgang Schuster
@ 2010-01-04 16:28 ` Hans Hagen
  2010-01-04 16:57   ` \framedparameter Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2010-01-04 16:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4-1-2010 14:04, Wolfgang Schuster wrote:

> Can you provide a mechanism to access these values again on the user side, e.g. \userparameter{framed:toprulethickness}.

beta ... also has:

\def\frameddimension#1{\the\dimexpr\framedparameter{#1}\relax}


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 3+ messages in thread

* Re: \framedparameter
  2010-01-04 16:28 ` \framedparameter Hans Hagen
@ 2010-01-04 16:57   ` Wolfgang Schuster
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2010-01-04 16:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 04.01.2010 um 17:28 schrieb Hans Hagen:

> On 4-1-2010 14:04, Wolfgang Schuster wrote:
> 
>> Can you provide a mechanism to access these values again on the user side, e.g. \userparameter{framed:toprulethickness}.
> 
> beta ... also has:
> 
> \def\frameddimension#1{\the\dimexpr\framedparameter{#1}\relax}

What a nice start of the new year, thank you very much for the quick fix.

Best regards and a happy new year,
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] 3+ messages in thread

end of thread, other threads:[~2010-01-04 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-04 13:04 \framedparameter Wolfgang Schuster
2010-01-04 16:28 ` \framedparameter Hans Hagen
2010-01-04 16:57   ` \framedparameter 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).