From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97258 Path: news.gmane.org!.POSTED!not-for-mail From: Sergey Slyusarev Newsgroups: gmane.comp.tex.context Subject: Re: Bug: \textext inside \*MPinclusions causes error Date: Tue, 14 Feb 2017 01:36:58 +0300 Message-ID: References: <5ff6c190-3493-e46a-2fa9-909cb1abb3c8@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2668924855224637526==" X-Trace: blaine.gmane.org 1487146179 2277 195.159.176.226 (15 Feb 2017 08:09:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2017 08:09:39 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 15 09:09:35 2017 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 blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cduec-0000B4-3p for gctc-ntg-context-518@m.gmane.org; Wed, 15 Feb 2017 09:09:34 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8B60F12A01BA; Wed, 15 Feb 2017 09:09:19 +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 umNXdqu1x5Ja; Wed, 15 Feb 2017 09:09:18 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 8CF9312A0199; Wed, 15 Feb 2017 09:09:18 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 785F012A0300 for ; Mon, 13 Feb 2017 23:37:12 +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 tUTCynNjunT4 for ; Mon, 13 Feb 2017 23:37:11 +0100 (CET) Original-Received: from mail-yw0-f178.google.com (mail-yw0-f178.google.com [209.85.161.178]) (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 CF22712A02FF for ; Mon, 13 Feb 2017 23:37:00 +0100 (CET) Original-Received: by mail-yw0-f178.google.com with SMTP id w75so57702349ywg.1 for ; Mon, 13 Feb 2017 14:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hh5hNwQwjNS/GRlEMOD5mhH5SDK2Bjn5RUy9G/EMe4M=; b=e4Zh609Z2d65JTq/rNhOufS2jgddIBcg82R/k1GijXWj6IKtF05RNkBzRGIbrUw8+5 94iBSU9NauCneQ2sHrB/5CJtHsouEyz5cIUpLqKJc10ojOR5/eIJMR9gzPBo7Xn/Xdb+ vGsqOOSgC0Vh6H33Gi9ru63GOP5VCOCxVIi8cN2knXkno7Jg16FpF290DMQrq4JjFT2y AjkN5rdD2uxa0ZKusROnuFNImiqrSSRGr1iTBOi2zXEUEDx7tmOUVxMrxFbnz7ULnMYV cHF+gu1bGbglCqT67eQUN9WRuBbUuOMtUohVanlWDIIVUUMNSvwsluKANU8NZVm3+F5O jMkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hh5hNwQwjNS/GRlEMOD5mhH5SDK2Bjn5RUy9G/EMe4M=; b=gpo+HAfmNbSI9rwsYkoUyOeffoW7hyGZHAvr7mTk3m8qNrngkU3bwoHJ5ZvU7DgUun daBWMlNSDDDjrdlTIHFz/seI5DyWNK6E/dWQeAGPTGuBmQXArITHo0x5XwpYEicnsUvr lGODMPxUALUyeneIpybkDfMBOWCeXbgz7jElPZE9wFH0WjdlDDy4Shfhq2IZ1JyOTZmg ymuUX8GOU7qgOxsqLRSy629hqwt0XlMZC8QYBB3f0Na8MrR6KOF00H+y+QNVWO+stoPv TRQRI8WK8JJVGCwr+vUTkeobQADZzet2enjYUP/jKFnMAvsqOPtX4M0bnH8RUamhC/15 oVNA== X-Gm-Message-State: AMke39kM8nAxMRCa700cwrPxaZDXWE2wUxVHt6pyBvw/MIbXkWePvwSC5SEQ2zVuT3RH7YrluZV8DpZbyV4Ypw== X-Received: by 10.13.198.194 with SMTP id i185mr18882040ywd.158.1487025419401; Mon, 13 Feb 2017 14:36:59 -0800 (PST) Original-Received: by 10.37.170.10 with HTTP; Mon, 13 Feb 2017 14:36:58 -0800 (PST) In-Reply-To: X-Mailman-Approved-At: Wed, 15 Feb 2017 09:09:17 +0100 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:97258 Archived-At: --===============2668924855224637526== Content-Type: multipart/alternative; boundary=001a114e6082e53f5e0548711518 --001a114e6082e53f5e0548711518 Content-Type: text/plain; charset=UTF-8 > It's a single tex run so you can do: > \starttext > \newbox\MyMpBox \setbox\MyMpBox\hbox{foo} > \startMPcode > draw textext("\copy\MyMpBox") ; > \stopMPcode > \startMPcode > draw textext("\copy\MyMpBox") rotated 45; > \stopMPcode > \stoptext This is not much different from: \starttext \startMPinclusions string t; t := "foo"; \stopMPinclusions \startMPcode draw textext(t); \stopMPcode \startMPcode draw textext(t) rotated 45; \stopMPcode \stoptext but the problem was not with passing just text, but with more complex images that may or may not contain text, without specifically addressing text after image is defined. --001a114e6082e53f5e0548711518 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> It's a single tex run so you can do:
> \starttext
> \newbox\MyMpBox \setbox\MyMpBox\hbox{foo}
> \startMPcode
>=C2=A0 =C2=A0 draw textext("\copy\MyMpBox") ;
> \stopMPcode
> \startMPcode
>=C2=A0 =C2=A0 draw textext("\copy\MyMpBox") rotated 45;
> \stopMPcode
> \stoptext

This is not much different from:

\starttext

\startMPinclusions

=C2=A0=C2=A0=C2=A0 string t;

=C2=A0=C2=A0=C2=A0 t :=3D "foo= ";

\stopMPinclusions

\startMPcode

=C2=A0=C2=A0=C2=A0 draw textext(= t);

\stopMPcode

\startMPcode

=C2=A0=C2=A0=C2=A0 draw textext(= t) rotated 45;

\stopMPcode

\stoptext


but the p= roblem was not with passing just text, but with more complex images that ma= y or may not contain text, without specifically addressing text after image= is defined.

--001a114e6082e53f5e0548711518-- --===============2668924855224637526== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============2668924855224637526==--