ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jeong Dal <haksan@me.com>
To: "list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl" <ntg-context@ntg.nl>
Subject: Re: weekend upload
Date: Tue, 13 Jul 2021 04:29:47 +0900	[thread overview]
Message-ID: <7056C37E-B5FC-4560-AEE1-DE320CA6DBC3@me.com> (raw)
In-Reply-To: <mailman.580.1626060721.1143.ntg-context@ntg.nl>


[-- Attachment #1.1: Type: text/plain, Size: 1794 bytes --]

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=0]{boxes}
> 
> to show the three boxes, and on the next slide, I can use
> 
>    \useMPgraphic[stacking={-1,0}]{boxes}
> 

I tried to reproduce your example using \startuseMPgraphic{boxes} … \stopuseMPgraphic, and useMPgraphic[stacking=0]{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 =
    a -- (xpart a, ypart b) -- b
  enddef ;
  primarydef a -+ b =
    a -- (xpart b, ypart a) -- b
  enddef ;
\stopMPdefinitions
\defineframed
  [boxframed]
  [
    width=6em,
    height=2\lineheight,
    align={middle,lohi},
    background=color,
    backgroundcolor=blue,
    foregroundcolor=white,
    forefroundstyle=bold,
  ]

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

  defaultdx := 0pt;
  defaultdy := 0pt;

  A.c = origin;

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

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

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

  newpath highlight;

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

\stopuseMPgraphic

\starttext
\useMPgraphic[stacking={0}]{boxes}
\useMPgraphic[stacking={0,1}]{boxes}
\useMPgraphic[stacking=-1]{boxes}
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 10974 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

       reply	other threads:[~2021-07-12 19:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.580.1626060721.1143.ntg-context@ntg.nl>
2021-07-12 19:29 ` Jeong Dal [this message]
2021-07-12 20:00   ` Aditya Mahajan
2021-07-13 10:25 ` weekend upload - stacking and animation Jeong Dal
2021-07-13 13:14   ` Hans Hagen
2021-07-13 14:11     ` Floris van Manen
2021-07-13 15:02       ` Hans Hagen
2021-07-13 14:59   ` Wolfgang Schuster
2021-07-13 22:34     ` Jeong Dal
     [not found] <mailman.1.1626170401.2795.ntg-context@ntg.nl>
2021-07-13 10:29 ` weekend upload Jeong Dal
2021-07-09 16:29 Hans Hagen
2021-07-09 17:19 ` Hans Hagen
2021-07-09 21:33 ` Aditya Mahajan
2021-07-09 22:24   ` Hans Hagen
2021-07-10 20:44   ` Hans Hagen
2021-07-11 13:04 ` Bruce Horrocks
2021-07-11 15:00   ` Hans Hagen
2021-07-12  3:31   ` Aditya Mahajan
2021-07-12  8:07     ` Hans Hagen
2021-07-12 10:12       ` Floris van Manen
2021-07-12 16:47         ` Hans Hagen
2021-07-12  9:07     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7056C37E-B5FC-4560-AEE1-DE320CA6DBC3@me.com \
    --to=haksan@me.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).