From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55990 Path: news.gmane.org!not-for-mail From: Peter =?utf-8?Q?M=C3=BCnster?= Newsgroups: gmane.comp.tex.context Subject: Re: simple usage of \hpos Date: Sun, 7 Feb 2010 15:26:31 +0100 Message-ID: <20100207142631.GA9319@gaston.couberia.bzh> References: <20100206221737.GA697@gaston.couberia.bzh> <4B6E7D0C.7030507@googlemail.com> <20100207122229.GA6516@gaston.couberia.bzh> <4B6EB637.1020301@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1265552809 27823 80.91.229.12 (7 Feb 2010 14:26:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Feb 2010 14:26:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 07 15:26:42 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ne85x-0003uU-4A for gctc-ntg-context-518@m.gmane.org; Sun, 07 Feb 2010 15:26:41 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EA26BC9C96; Sun, 7 Feb 2010 15:28:07 +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 Skn5WIUt1HDV; Sun, 7 Feb 2010 15:28:07 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0693CC9C97; Sun, 7 Feb 2010 15:28:05 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 03FE4C9C97 for ; Sun, 7 Feb 2010 15:28:04 +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 0j5CAZIOk3fv for ; Sun, 7 Feb 2010 15:28:01 +0100 (CET) Original-Received: from smtp19.orange.fr (smtp19.orange.fr [80.12.242.18]) by balder.ntg.nl (Postfix) with ESMTP id AD28EC9C96 for ; Sun, 7 Feb 2010 15:28:01 +0100 (CET) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1926.orange.fr (SMTP Server) with ESMTP id DBDB72000746 for ; Sun, 7 Feb 2010 15:26:33 +0100 (CET) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1926.orange.fr (SMTP Server) with ESMTP id CD9F4200080B for ; Sun, 7 Feb 2010 15:26:33 +0100 (CET) Original-Received: from gaston.couberia.bzh (ARennes-551-1-52-188.w92-135.abo.wanadoo.fr [92.135.123.188]) by mwinf1926.orange.fr (SMTP Server) with ESMTP id 99C8A2000746 for ; Sun, 7 Feb 2010 15:26:33 +0100 (CET) X-ME-UUID: 20100207142633630.99C8A2000746@mwinf1926.orange.fr Original-Received: by gaston.couberia.bzh (Postfix, from userid 1000) id D5A6330540; Sun, 7 Feb 2010 15:26:31 +0100 (CET) Mail-Followup-To: mailing list for ConTeXt users Content-Disposition: inline In-Reply-To: <4B6EB637.1020301@googlemail.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55990 Archived-At: On Sun, Feb 07 2010, Wolfgang Schuster wrote: > Remove the 'position=yes' setup and correct the coordinates, layers use the > top left corner as origin but positions are measures from the left bottom > corner. Ah, now I see, why the graphics was at the bottom before. Thank you very much! Here an example to show how I use it: \usemodule[pre-stepwise] \setupinteraction[state=start] \definelayer[myBG] \setupbackgrounds[page][background=myBG] \def\PlaceAtPos{\dosingleempty\doPlaceAtPos} \def\doPlaceAtPos[#1]#2#3{% \getparameters[PAA][dx=0pt, dy=0pt, #1]% \setbox\scratchbox\hbox{#3}% \setlayer[myBG][% x=\the\dimexpr\MPx{#2} - 0.5\wd\scratchbox\relax, y=\the\dimexpr\paperheight-\MPy{#2}-\ht\scratchbox\relax, dx=\PAAdx, dy=\PAAdy]{#3}} \starttext Place something exactly 2cm left from he\xypos{XXX}re. Place something exactly 1 line below he\xypos{YYY}re. Place something exactly he\xypos{ZZZ}re. \StartSteps \PlaceAtPos[dx=-2cm]{XXX}{\red something} \FlushStep \PlaceAtPos[dy=\lineheight]{YYY}{\green something} \FlushStep \PlaceAtPos{ZZZ}{\blue something} \FlushStep \StopSteps \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___________________________________________________________________________________ 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 ___________________________________________________________________________________