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
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 -----------------------------------------------------------------
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
participants (2)
-
Hans Hagen
-
Wolfgang Schuster