From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93208 Path: news.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Problem to place a label in an environment \startMPcode \stopMPcode Date: Thu, 31 Dec 2015 17:46:35 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9172938825506235848==" X-Trace: ger.gmane.org 1451580453 10842 80.91.229.3 (31 Dec 2015 16:47:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Dec 2015 16:47:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 31 17:47:22 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aEgNl-0006Og-Po for gctc-ntg-context-518@m.gmane.org; Thu, 31 Dec 2015 17:47:21 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BD7B35BC9; Thu, 31 Dec 2015 17:46:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZkvqHqZjBxDJ; Thu, 31 Dec 2015 17:46:49 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 41CB95BCF; Thu, 31 Dec 2015 17:46:49 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5D1A15BAB for ; Thu, 31 Dec 2015 17:46:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8SUcOt2rvZFP for ; Thu, 31 Dec 2015 17:46:47 +0100 (CET) Original-Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id AD4DA5B5B for ; Thu, 31 Dec 2015 17:46:37 +0100 (CET) Original-Received: by mail-io0-f169.google.com with SMTP id 1so50753606ion.1 for ; Thu, 31 Dec 2015 08:46:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=U8SOhtdh+QMiFlzIvz6KxkS2DaXwttUs9llr+oPm2Zg=; b=agLdFTgYvy6oNhRZydQFcNSUFaMYtIEkGe7Y5h4NClbevBdXgdGjmVMT3kSWwhDcGW KW72o9HsjDGj/mb/C6nEKAdjiGhxGptd8UURGJ3kjmDYldIsx88bf0Qq89sjXyY3Qduq L+3PKfkmCoBu7e6wbcU6X9TGEStG2px0OanptMBe2iR+F+qjpo/9drRdvnvibaKsj2js aOLNHSp1EBuP/4vqUoYtB3JTRl+RZasS9OqFIU4OTQKy/lAovErF9Hl92LcHRkqNXjqK 5aR/tLMgba4rx/fUhQZxXFwbuAgBRbnvqAjA0Z/wC+6zYicO9WpfCyBkimdijHDC8TbF NYjA== X-Received: by 10.107.12.13 with SMTP id w13mr62903637ioi.33.1451580395828; Thu, 31 Dec 2015 08:46:35 -0800 (PST) Original-Received: by 10.64.1.9 with HTTP; Thu, 31 Dec 2015 08:46:35 -0800 (PST) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:93208 Archived-At: --===============9172938825506235848== Content-Type: multipart/alternative; boundary=001a113ed654db50c7052834651e --001a113ed654db50c7052834651e Content-Type: text/plain; charset=UTF-8 Hello, The code below works perfectly without the placement of the label, but if I want to place the label, it no longer works. Thank you \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,none}] \starttext \switchtobodyfont [pagella, 9pt] \placerecipe{}{ \startMPcode pair vert[] ; n:=6 ; radius=2cm ; for i=0 upto n : vert[i] = radius * dir(360*i/n) ; endfor ; draw for i=0 upto n-1: vert[i] -- endfor cycle withcolor blue ; draw for i=0 upto n-1: vert[i] .. endfor cycle withcolor red ; draw (0,0)--vert[0] withcolor green ; draw (0,0)--vert[5] withcolor green ; draw (0,0) --(vert[0]+vert[5])/2 dashed evenly ; % label.urt("C",vert[1]) ; \stopMPcode } \input knuth \stoptext --001a113ed654db50c7052834651e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,
The code b= elow works perfectly withou= t the placement of the labe= l, but if I want to place t= he label, it no longer work= s.
Thank you

\definefloat
=C2=A0=C2= =A0 [recipe]
=C2=A0=C2=A0 [figure]

\setupfloat
=C2=A0=C2=A0 [r= ecipe]
=C2=A0=C2=A0 [default=3D{right,none}]

\starttext

\s= witchtobodyfont [pagella, 9pt]

\placerecipe{}{

\startMPcode
pair vert[] ;
n:=3D6 ; radius=3D2cm ;
for i=3D0 upto n :
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 vert[i] =3D radius * dir(360*i/n= ) ;
endfor ;

draw for i=3D0 upto n-1: vert[i] -- endfor cycle wit= hcolor blue ;

draw for i=3D0 upto n-1: vert[i] .. endfor cycle with= color red ;

draw (0,0)--vert[0] withcolor green ;

draw (0,0)= --vert[5] withcolor green ;

draw (0,0) --(vert[0]+vert[5])/2 dashed = evenly ;

% label.urt("C",vert[1])=C2=A0 ;


\stop= MPcode=C2=A0
}

\input knuth

\stoptext
--001a113ed654db50c7052834651e-- --===============9172938825506235848== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============9172938825506235848==--