From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112114 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeong Dal Newsgroups: gmane.comp.tex.context Subject: Re: weekend upload Date: Tue, 13 Jul 2021 04:29:47 +0900 Message-ID: <7056C37E-B5FC-4560-AEE1-DE320CA6DBC3@me.com> References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Content-Type: multipart/mixed; boundary="===============2594325476106225858==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38429"; mail-complaints-to="usenet@ciao.gmane.io" To: "list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl" Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 12 21:30:33 2021 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 1m31dO-0009lp-KB for gctc-ntg-context-518@m.gmane-mx.org; Mon, 12 Jul 2021 21:30:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DEC04285AC5; Mon, 12 Jul 2021 21:29:59 +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 ljwBkcR7WXBj; Mon, 12 Jul 2021 21:29:58 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 318A4285AC8; Mon, 12 Jul 2021 21:29:58 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 27D61285AAF for ; Mon, 12 Jul 2021 21:29:56 +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 Il8zywoQeu8w for ; Mon, 12 Jul 2021 21:29:55 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.58.6.58; helo=pv50p00im-ztdg10022001.me.com; envelope-from=haksan@me.com; receiver= Original-Received: from pv50p00im-ztdg10022001.me.com (pv50p00im-ztdg10022001.me.com [17.58.6.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 04706285AAC for ; Mon, 12 Jul 2021 21:29:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1626118193; bh=ZWwBD4diNgn99X0eAhoiBj/83tbPE3EKeIj7zQlgrpM=; h=From:Content-Type:Mime-Version:Subject:Date:To:Message-Id; b=pRJBX9Wl0Ja9DOsFoe6K9S5zqR8aI/bc4fkso4mDKG0eyE18JZSpmPu/r8X7LGeGU 9Lvme+a8Sg/y7nwgqvfpPQPk9Qe6d3isiU7Fw8kgr7QejjTKg7uAad0SXupVtmGstC abILvPehZoQOLj1fLefMc56zKaCWFiHTzxgqsFb7rYeVMxjcw5BUEV1TQgxL4JKThx sS7vm02k9lajtGOQ8081ZNbb0fY4D06kZ8+CMhJG+lG08FP640NfmNJ3PiiN61uXi6 xsoyh1JRg+Hl5cAiuGNMC4unWCJd+iBNwbvPSfK6HAQMf6Xe++s28ta0/97I4xiJ12 Am0zMTbjxdX9g== Original-Received: from smtpclient.apple (unknown [222.232.154.22]) by pv50p00im-ztdg10022001.me.com (Postfix) with ESMTPSA id F2034A0087 for ; Mon, 12 Jul 2021 19:29:51 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-12_11:2021-07-12, 2021-07-12 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=692 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2009150000 definitions=main-2107120137 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:112114 Archived-At: --===============2594325476106225858== Content-Type: multipart/alternative; boundary="Apple-Mail=_2B8B16F0-05AD-4EEE-9C71-C34D1DB93CED" --Apple-Mail=_2B8B16F0-05AD-4EEE-9C71-C34D1DB93CED Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Dear Aditya, Thank you for your code and an explanation. > Let's assume that the last MPpage was a \startuseMPgraphic{boxes} .... = \stopuseMPgraphic. Suppose I wanted to use these pictures in a = presentation. On the first slide, I can use >=20 > \useMPgraphic[stacking=3D0]{boxes} >=20 > to show the three boxes, and on the next slide, I can use >=20 > \useMPgraphic[stacking=3D{-1,0}]{boxes} >=20 I tried to reproduce your example using \startuseMPgraphic{boxes} =E2=80=A6= \stopuseMPgraphic, and useMPgraphic[stacking=3D0]{boxes} . A modified one of your code is below. There is no error message but no output at all. Would you please tell me what is wrong in here? Best regards, Dalyoung \startMPdefinitions input boxes; primarydef a +- b =3D a -- (xpart a, ypart b) -- b enddef ; primarydef a -+ b =3D a -- (xpart b, ypart a) -- b enddef ; \stopMPdefinitions \defineframed [boxframed] [ width=3D6em, height=3D2\lineheight, align=3D{middle,lohi}, background=3Dcolor, backgroundcolor=3Dblue, foregroundcolor=3Dwhite, forefroundstyle=3Dbold, ] \startuseMPgraphic[offset=3D2mm]{boxes} boxit.A("\boxframed{Box A}"); boxit.B("\boxframed{Box B}"); boxit.C("\boxframed{Box C}"); defaultdx :=3D 0pt; defaultdy :=3D 0pt; A.c =3D origin; B.w - A.e =3D (1cm, 0); 0.5[ A.s, B.s ] - C.n =3D (0, 1cm); stacking :=3D 0; drawunboxed(A,B,C); stacking :=3D 1; drawarrow A.s +- C.w ; drawarrow B.s +- C.e ; newpath highlight; highlight :=3D (A.sw -- B.se -- B.ne -- A.nw) enlarged EmWidth; fill highlight withcolor "darkgray" withstacking -1; \stopuseMPgraphic \starttext \useMPgraphic[stacking=3D{0}]{boxes} \useMPgraphic[stacking=3D{0,1}]{boxes} \useMPgraphic[stacking=3D-1]{boxes} \stoptext= --Apple-Mail=_2B8B16F0-05AD-4EEE-9C71-C34D1DB93CED Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Dear = Aditya,

Thank you for your = code and an explanation.

Let's assume = that the last MPpage was a \startuseMPgraphic{boxes} .... = \stopuseMPgraphic. Suppose I wanted to use these pictures in a = presentation. On the first slide, I can use

=    \useMPgraphic[stacking=3D0]{boxes}

to show the three boxes, and on the next slide, I can use

=    \useMPgraphic[stacking=3D{-1,0}]{boxes}


I tried to reproduce your example using = \startuseMPgraphic{boxes} =E2=80=A6 \stopuseMPgraphic, and = useMPgraphic[stacking=3D0]{boxes} .
A = modified one of your code is below.
There= is no error message but no output at all.
Would you please tell me what is wrong in = here?

Best regards,
Dalyoung


\startMPdefinitions
input = boxes;

primarydef a +- b =3D
a -- (xpart a, ypart = b) -- b
= enddef ;
primarydef a -+ b =3D
a -- (xpart b, ypart = a) -- b
= enddef ;
\stopMPdefinitions
\defineframed
[boxframed]
= [
= width=3D6em,
height=3D2\lineheight,
align=3D{middle,lohi},
background=3Dcolor,
backgroundcolor=3Dblue,
foregroundcolor=3Dwhite,
forefroundstyle=3Dbold,
]

\startuseMPgraphic[offset=3D2mm]{boxes}
boxit.A("\boxframed{Box A}");
boxit.B("\boxframed{Box B}");
boxit.C("\boxframed{Box C}");

defaultdx = :=3D 0pt;
= defaultdy :=3D 0pt;

A.c =3D = origin;

B.w = - A.e =3D (1cm, 0);

0.5[ A.s, B.s ] - = C.n =3D (0, 1cm);

stacking = :=3D 0;
= drawunboxed(A,B,C);
= stacking :=3D 1;
= drawarrow A.s +- C.w ;
drawarrow B.s +- C.e ;

newpath highlight;

highlight :=3D (A.sw -- B.se = -- = B.ne -- A.nw) enlarged EmWidth;
fill = highlight withcolor "darkgray" withstacking -1;

\stopuseMPgraphic

\starttext
\useMPgraphic[stacking=3D{0}]{boxes}
\useMPgraphic[stacking=3D{0,1}]{boxes}
\useMPgraphic[stacking=3D-1]{boxes}
\stoptext
= --Apple-Mail=_2B8B16F0-05AD-4EEE-9C71-C34D1DB93CED-- --===============2594325476106225858== 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== --===============2594325476106225858==--