From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: \framedparameter
Date: Mon, 4 Jan 2010 14:04:17 +0100 [thread overview]
Message-ID: <969627E2-D660-4E03-B067-D4799BB4537D@googlemail.com> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2010-01-04 13:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-04 13:04 Wolfgang Schuster [this message]
2010-01-04 16:28 ` \framedparameter Hans Hagen
2010-01-04 16:57 ` \framedparameter Wolfgang Schuster
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=969627E2-D660-4E03-B067-D4799BB4537D@googlemail.com \
--to=schuster.wolfgang@googlemail.com \
--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).