From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107077 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Using \startuseMPgraphic inside a textext() in METAPOST? Date: Mon, 27 Apr 2020 10:47:09 +0200 Message-ID: <2BC0A415-458A-4DC7-9949-0D26257F636C@rna.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="===============1752596864357726150==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="4576"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 27 10:47:46 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jSzQX-00014y-RT for gctc-ntg-context-518@m.gmane-mx.org; Mon, 27 Apr 2020 10:47:45 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2B272183766; Mon, 27 Apr 2020 10:47:14 +0200 (CEST) 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 6mL64KHnK9Dn; Mon, 27 Apr 2020 10:47:12 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 356BC18324E; Mon, 27 Apr 2020 10:47:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EE0B018324E for ; Mon, 27 Apr 2020 10:47:10 +0200 (CEST) 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 kIhsQLLr_S8q for ; Mon, 27 Apr 2020 10:47:10 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 4E821180AB9 for ; Mon, 27 Apr 2020 10:47:10 +0200 (CEST) Original-Received: from hermione.rna.nl (hermione.rna.nl [192.168.2.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id B924A3DCB340 for ; Mon, 27 Apr 2020 10:47:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1587977229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=QMT+ipqkVySbD612P5bkreYeNy7xKB1WDsmqgbfdLKQ=; b=I9yUsmgygRL5aTXnl7wgjE6WBH9vtKzFjA5MJ0yhodqqQ/qvlVTRiMHMlJgTARJziKjy87 GPzhCYu0HiJbdJsOmeQ+Y9RiWrOk7qm85MU89dcrcfj4iEXBTNb5g5KWVmvRgzG1DurhY8 SSUFVgshn9kXyyzmS+cFg60uflGaWJrgo7Jh/iKpgnTROm+MrXhJV84sFiyNFAsRYOWflM PbmIfVTMa2KipoTs2mgp/I0/t18ffxft9bZlkhEikxVCdf814KMgNZgbldBAZRBi2SUVsr 4vwu9ZeKhzYh1D5zwxSdSHlAVGcfBREFe7djET+Ha3gKkBVzBk4fMuGfUnfrWg== X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:107077 Archived-At: --===============1752596864357726150== Content-Type: multipart/alternative; boundary="Apple-Mail=_F90CAFD5-A50B-430A-99A0-73FEF4275B3A" --Apple-Mail=_F90CAFD5-A50B-430A-99A0-73FEF4275B3A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I am in METAPOST which is inside TeX and I=E2=80=99d like (in METAPOST, = not in TeX) to let a string follow a path. Adapting from the MetaFun = manual around page 250, I tried this: \starttext \startMPpage[instance=3Ddoublefun] pic p; p :=3D textext("\startuseMPgraphic[instance=3Ddoublefun]{followtokens}path= RotPath ; RotPath :=3D fullcircle ;\stopuseMPgraphic\followtokens{I am = creating a line of text here}"); draw pic; \stopMPpage \stoptext But that does not work. Is there a way I can from within my METAPOST = code get string (TeX code) to follow a path I have? In my case, I = cannot escape outside the \startMPpage- -\stopMPpage environment, as the = actual path is constructed there and the text following the path should = be on that page. G= --Apple-Mail=_F90CAFD5-A50B-430A-99A0-73FEF4275B3A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 I = am in METAPOST which is inside TeX and I=E2=80=99d like (in METAPOST, = not in TeX) to let a string follow a path. Adapting from the MetaFun = manual around page 250, I tried this:

\starttext

\startMPpage[instance=3Ddoublefun]
pic p;
p :=3D = textext("\startuseMPgraphic[instance=3Ddoublefun]{followtokens}path = RotPath ; RotPath :=3D fullcircle ;\stopuseMPgraphic\followtokens{I am = creating a line of text here}");
draw pic;
\stopMPpage

\stoptext

But that does not work. Is there a way = I can from within my METAPOST code get  string (TeX code) to follow = a path I have? In my case, I cannot escape outside the \startMPpage- = -\stopMPpage environment, as the actual path is constructed there and = the text following the path should be on that page.

G
= --Apple-Mail=_F90CAFD5-A50B-430A-99A0-73FEF4275B3A-- --===============1752596864357726150== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============1752596864357726150==--