From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55992 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 16:28:17 +0100 Message-ID: <20100207152817.GA12939@gaston.couberia.bzh> References: <20100206221737.GA697@gaston.couberia.bzh> <4B6E7D0C.7030507@googlemail.com> <20100207122229.GA6516@gaston.couberia.bzh> <4B6EB637.1020301@googlemail.com> <20100207142631.GA9319@gaston.couberia.bzh> <4B6ED4B6.30104@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 1265556531 5419 80.91.229.12 (7 Feb 2010 15:28:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Feb 2010 15:28:51 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 07 16:28:45 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 1Ne941-0001yg-7Z for gctc-ntg-context-518@m.gmane.org; Sun, 07 Feb 2010 16:28:45 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4CC4EC9BC1; Sun, 7 Feb 2010 16:30:12 +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 r06wTQUMyoNY; Sun, 7 Feb 2010 16:30:09 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C658BC9C04; Sun, 7 Feb 2010 16:30:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2D5B6C9C04 for ; Sun, 7 Feb 2010 16:30:09 +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 pc36uQLioUHQ for ; Sun, 7 Feb 2010 16:29:48 +0100 (CET) Original-Received: from smtp2e.orange.fr (smtp2e.orange.fr [80.12.242.113]) by balder.ntg.nl (Postfix) with ESMTP id 28759C9BC1 for ; Sun, 7 Feb 2010 16:29:47 +0100 (CET) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2e26.orange.fr (SMTP Server) with ESMTP id CCA5B8000FD6 for ; Sun, 7 Feb 2010 16:28:19 +0100 (CET) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2e26.orange.fr (SMTP Server) with ESMTP id BFF5280011F8 for ; Sun, 7 Feb 2010 16:28:19 +0100 (CET) Original-Received: from gaston.couberia.bzh (ARennes-551-1-52-188.w92-135.abo.wanadoo.fr [92.135.123.188]) by mwinf2e26.orange.fr (SMTP Server) with ESMTP id 96CAE8000FD6 for ; Sun, 7 Feb 2010 16:28:19 +0100 (CET) X-ME-UUID: 20100207152819617.96CAE8000FD6@mwinf2e26.orange.fr Original-Received: by gaston.couberia.bzh (Postfix, from userid 1000) id C702F30540; Sun, 7 Feb 2010 16:28:17 +0100 (CET) Mail-Followup-To: mailing list for ConTeXt users Content-Disposition: inline In-Reply-To: <4B6ED4B6.30104@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:55992 Archived-At: On Sun, Feb 07 2010, Wolfgang Schuster wrote: >> \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}} > > \def\doPlaceAtPos[#1]#2% > {\dowithnextbox > {\setlayer > [myBG] > [x=\the\dimexpr\MPx{#2}-\nextboxwd/2\relax, > y=\the\dimexpr\paperheight-\MPy{#2}-\nextboxht\relax, > #1] > {\flushnextbox}} > \normalhbox} Thank you for this \dowithnextbox command! (I keep \getparameters... because I want to use it for other parameters outside of \setlayer) 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 ___________________________________________________________________________________