From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83063 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Vertically Aligning inmargin Text to Figure Date: Tue, 18 Jun 2013 10:05:45 +0200 Message-ID: References: <200A8465-03ED-400D-8076-9812ECDB012F@stien.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1371542764 12819 80.91.229.3 (18 Jun 2013 08:06:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2013 08:06:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 18 10:06:06 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UoqvU-0008T1-40 for gctc-ntg-context-518@m.gmane.org; Tue, 18 Jun 2013 10:06:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7273A101E6; Tue, 18 Jun 2013 10:06:03 +0200 (CEST) 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 RG8+XU6pmAMP; Tue, 18 Jun 2013 10:06:01 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D42C9101E8; Tue, 18 Jun 2013 10:06:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CDC35101E8 for ; Tue, 18 Jun 2013 10:06:00 +0200 (CEST) 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 TolUh3sAY-yz for ; Tue, 18 Jun 2013 10:05:56 +0200 (CEST) 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 36E52101E6 for ; Tue, 18 Jun 2013 10:05:46 +0200 (CEST) Original-Received: from mail-ee0-x22f.google.com (mail-ee0-x22f.google.com [IPv6:2a00:1450:4013:c00::22f]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r5I85jh7008311 for ; Tue, 18 Jun 2013 10:05:45 +0200 Original-Received: by mail-ee0-f47.google.com with SMTP id e49so2281731eek.6 for ; Tue, 18 Jun 2013 01:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=ECmle5qoOocw/bK1zHNJt/pGdijdNoxutw6d1c1TuOQ=; b=TxN989MwFHBzrc2Txpxo7fmmvTC9lU9D1hqJktaIRkQTw9S0O+9oUvEDebXfH4VXst 5eSqhvJMJlyMdA18ndrSW8yJQwpYs9YmcO3pSo3bm3J2CdM5V/QWvWEuxbE1ltGoJwag joRhyJgpT+M2y4v90tUnVFEXUF7GULslTBTcvUqMgXH+8SQZsGH3awKksAhloDFCbkFJ oRgtY6CkM2oYSF9/5IZ4mUkXHSHHMVAYfTV/RgypZtr004CMZSvOyftA1kyP9fDL7U3w SuhDTswmpnEUzLQO72slwgSSUs4szFrCutqSAspznRTAKFcbnAv6ZbEDUTIjFBMkt5XS GZjQ== X-Received: by 10.14.3.73 with SMTP id 49mr21195139eeg.72.1371542745524; Tue, 18 Jun 2013 01:05:45 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4dbfb4b8.pool.mediaWays.net. [77.191.180.184]) by mx.google.com with ESMTPSA id n5sm14240431eed.9.2013.06.18.01.05.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Jun 2013 01:05:45 -0700 (PDT) In-Reply-To: <200A8465-03ED-400D-8076-9812ECDB012F@stien.de> X-Mailer: Apple Mail (2.1508) X-Bayes-Prob: 0.9587 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c00::22f; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01JNI5JN6 - 2fca7f6f9ba5 - 20130618 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:83063 Archived-At: Am 18.06.2013 um 06:11 schrieb Malte Stien : > 2. Currently the code always uses the right margin; I need it to use the outer margin. I experimented swapping the \rlap for \llap, but then I still have to negatively \hskip the entire text width to the left. Even if I got that to work, I will have to wrap everything in an if-statement and have one branch for left and one for right pages. Right? How do I find out whether I am on a left or a right page? In other words, how would the if-statement look like. \define\FigureText {\dowithnextbox {\signalrightpage \doifrightpageelse\donetrue\donefalse \scratchdimen\nextboxht \hbox\bgroup \ifdone \midaligned{\flushnextbox}\rlap{\hskip\rightmargindistance\framed[frame=off,width=\rightmarginwidth,height=\scratchdimen]{\floatuserdataparameter{text}}}% \else \llap{\framed[frame=off,width=\rightmarginwidth,height=\scratchdimen]{\floatuserdataparameter{text}}\hskip\leftmargindistance}\midaligned{\flushnextbox}% \fi \egroup} \hbox} \setupfloat[figure][command=\FigureText] \setuppagenumbering[alternative=doublesided] \starttext \showgrid \dorecurse{4}{\input knuth\par} \startplacefigure[title=Dummy figure][text=Margin dummy] \externalfigure[dummy][width=.8\textwidth] \stopplacefigure \dorecurse{4}{\input knuth\par} \startplacefigure[title=Dummy figure][text=Margin dummy] \externalfigure[dummy][width=.8\textwidth] \stopplacefigure \dorecurse{4}{\input knuth\par} \startplacefigure[title=Dummy figure][text=Margin dummy] \externalfigure[dummy][width=.8\textwidth] \stopplacefigure \dorecurse{4}{\input knuth\par} \startplacefigure[title=Dummy figure][text=Margin dummy] \externalfigure[dummy][width=.8\textwidth] \stopplacefigure \dorecurse{4}{\input knuth\par} \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________