From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55442 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: \framedparameter Date: Mon, 4 Jan 2010 14:04:17 +0100 Message-ID: <969627E2-D660-4E03-B067-D4799BB4537D@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262610282 12088 80.91.229.12 (4 Jan 2010 13:04:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jan 2010 13:04:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 04 14:04:35 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NRmbq-0000EY-Vw for gctc-ntg-context-518@m.gmane.org; Mon, 04 Jan 2010 14:04:35 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 543AAC9BA1; Mon, 4 Jan 2010 14:04:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RBR3jJpuFG5S; Mon, 4 Jan 2010 14:04:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C2E65C9B66; Mon, 4 Jan 2010 14:04:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0301EC9B66 for ; Mon, 4 Jan 2010 14:04:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TVEBtKsYAIuq for ; Mon, 4 Jan 2010 14:04:19 +0100 (CET) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by balder.ntg.nl (Postfix) with ESMTP id BD0C4C9B4F for ; Mon, 4 Jan 2010 14:04:19 +0100 (CET) Original-Received: by fg-out-1718.google.com with SMTP id 16so4378898fgg.2 for ; Mon, 04 Jan 2010 05:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=LjhYdJqAshEClSfYdzr99wIvG43Z+sX5xcVcIUsnbWw=; b=LU7lawgMLjzK+6YTaseJ2kXJ17kf0gqSi87oElFfEPDr3hn7ZvdBecIc3K1sKnj3KD mTsFP6mCObL69w3F3Zokz5TEMBRc6b+NXPbSmmbJ1VOLg+j99PsQ5S4eERow0ij+fA7O nNTGEb17GAoha/I2dXhAXMQPN4ViP7+DIfAWM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=jIiGBd4BlfNAxH1q23M9ZNVUxCmofC7LPInQ+7o1wsf6FH0ywfixW8healdZqhHC3J ShSEQmm8HNPVZqhKwCDNN20Kny1k4O8SatIDBm+IC+dlNyLIoISwGp0kpn49NDbo0+bb m6nsGlax/FkCu+DVKjktuYEayPmheYwP2S1/o= Original-Received: by 10.87.62.29 with SMTP id p29mr31256729fgk.31.1262610259500; Mon, 04 Jan 2010 05:04:19 -0800 (PST) Original-Received: from ?192.168.2.23? (p5B29383C.dip.t-dialin.net [91.41.56.60]) by mx.google.com with ESMTPS id e11sm42419264fga.9.2010.01.04.05.04.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Jan 2010 05:04:19 -0800 (PST) X-Mailer: Apple Mail (2.1077) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55442 Archived-At: 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 ___________________________________________________________________________________