From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86008 Path: news.gmane.org!not-for-mail From: Elspeth McGullicuddy Newsgroups: gmane.comp.tex.context Subject: MPpositiongraphic: I don't know when it's going to work and when it's not. Date: Sun, 19 Jan 2014 08:00:10 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1390114811 10746 80.91.229.3 (19 Jan 2014 07:00:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jan 2014 07:00:11 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 19 08:00:20 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W4mMk-0007cc-UM for gctc-ntg-context-518@m.gmane.org; Sun, 19 Jan 2014 08:00:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0454A101E9; Sun, 19 Jan 2014 08:00:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qmjzLaZRbye2; Sun, 19 Jan 2014 08:00:16 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 86558101EA; Sun, 19 Jan 2014 08:00:16 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BAF51101E9 for ; Sun, 19 Jan 2014 08:00:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id blZZNjUuhk7P for ; Sun, 19 Jan 2014 08:00:13 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 51D29101F2 for ; Sun, 19 Jan 2014 08:00:13 +0100 (CET) Original-Received: from mail-oa0-x235.google.com (mail-oa0-x235.google.com [IPv6:2607:f8b0:4003:c02::235]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s0J7CXQt027261 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 19 Jan 2014 08:12:34 +0100 Original-Received: by mail-oa0-f53.google.com with SMTP id m1so5036532oag.26 for ; Sat, 18 Jan 2014 23:00:11 -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=xU6O9d5OmhalJ48+csUyTx8fEOHZBYkGPIv1nlC0Gtc=; b=LjZ8r6lGExgKmmrZtoLzjmmSI78EroQr3O1+1E2ohPXqbMIF3ppccXBBecVeTxGYtd lWfJQLjJ7ZQ74CGCLvGigVhazQkrI+B8INCIRo/7YGq662lhfdVmxnN4zIFE8GT39s14 4lVxX9MrUJT5Fd54ZkIcHCDGA4bG5Q/7xsQM239Ssqa0Vhuma0bicwmerTAqbLnWQkYn k581JJyRFtdGsRYEHI8ZgcJ+wYJGolVpDGHI7I+WfhRZCHzEz2nNJ8yvR/qO2ygmg8A+ TPyS98t/hRZ36xXrZEqNjmlrPEqYkLyxg5xF4olzmNagFQCg8Ak7GoMeaGxIGnqVhf8s LIVw== X-Received: by 10.182.113.195 with SMTP id ja3mr157140obb.46.1390114810683; Sat, 18 Jan 2014 23:00:10 -0800 (PST) Original-Received: by 10.76.33.129 with HTTP; Sat, 18 Jan 2014 23:00:10 -0800 (PST) X-Bayes-Prob: 0.0006 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4003:c02::235; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01LfHcyFM - 84b851ff69b7 - 20140119 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:86008 Archived-At: Hi, Can you help me with the two examples below, and also tell me how I could have found out myself when it should have worked and when it shouldn't: because until now, it is a mix of wild guess and poor trial and error. %%%%%% First example %%%%%%% \starttext %% This example doesn't work anymore if I comment the %% indicated line below. \defineoverlay[my first overlay][\uniqueMPgraphic{first demo}] \defineoverlay[my fourth overlay][\positionoverlay{my backgraphics}] \startpositionoverlay{my backgraphics} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=1cm,mypos:circlecolor=red} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=.5cm,mypos:circlecolor=green} \stoppositionoverlay \setupbackgrounds[paper][background={ my first overlay, %% Doesn't work anymore if I comment this line. my fourth overlay}] % These two lines can be removed without consequences \startuniqueMPgraphic{first demo} \stopuniqueMPgraphic \startMPpositiongraphic{mypos:circle} % absolute coordinates relative to paper by default? numeric x, y, w, h, d, radius; x = \MPx{\MPvar{self}}; y = \MPy{\MPvar{self}}; w = \MPw{\MPvar{self}}; radius = \MPvar{mypos:circleradius}; color c; c = \MPvar{mypos:circlecolor}; path p ; p = (x+w/2+radius,y)..(x+w/2,y+radius)..(x+w/2-radius,y) ..(x+w/2,y-radius)..cycle; drawarrow p withpen pencircle scaled 2pt withcolor c; \stopMPpositiongraphic have attached it: \hpos{three}{{\em here}}, the \stoptext %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% Second example %%%%%%%% \starttext %% This example doesn't work. Though it looks very much like the previous one. %% The overlay is attached to the backgound of a framed instead of to the %% background of the page. \defineoverlay[my first overlay][\uniqueMPgraphic{first demo}] \defineoverlay[my fourth overlay][\positionoverlay{my backgraphics}] \startpositionoverlay{my backgraphics} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=1cm,mypos:circlecolor=red} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=.5cm,mypos:circlecolor=green} \stoppositionoverlay % These two lines can be removed without consequences \startuniqueMPgraphic{first demo} \stopuniqueMPgraphic \startMPpositiongraphic{mypos:circle} % absolute coordinates relative to paper by default? numeric x, y, w, h, d, radius; x = \MPx{\MPvar{self}}; y = \MPy{\MPvar{self}}; w = \MPw{\MPvar{self}}; radius = \MPvar{mypos:circleradius}; color c; c = \MPvar{mypos:circlecolor}; path p ; p = (x+w/2+radius,y)..(x+w/2,y+radius)..(x+w/2-radius,y) ..(x+w/2,y-radius)..cycle; drawarrow p withpen pencircle scaled 2pt withcolor c; \stopMPpositiongraphic \framed [ background=my first overlay,my fourth overlay,align=middle,width=7cm] { have attached it: \hpos{three}{{\em here}}, the} \stoptext %%%%%%%%%%%%%%% Regards, Chris ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________