From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84394 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Conditional float references Date: Mon, 23 Sep 2013 18:46:50 +0200 Message-ID: <5240707A.5000902@wxs.nl> References: <20130922210228.GJ17308@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1379954818 3961 80.91.229.3 (23 Sep 2013 16:46:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Sep 2013 16:46:58 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 23 18:47:03 2013 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 1VO9Hq-0004tq-3L for gctc-ntg-context-518@m.gmane.org; Mon, 23 Sep 2013 18:47:02 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BF8FB101EB; Mon, 23 Sep 2013 18:44:56 +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 4MJa+r9mUyYH; Mon, 23 Sep 2013 18:44:53 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C037D101E8; Mon, 23 Sep 2013 18:44:53 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5B32B101E8 for ; Mon, 23 Sep 2013 18:44:52 +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 Uv53uzdP58xx for ; Mon, 23 Sep 2013 18:44:50 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 958B5101E5 for ; Mon, 23 Sep 2013 18:44:50 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r8NGksUF005497 for ; Mon, 23 Sep 2013 18:46:54 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.0.4.6; Original-Received: from [10.0.4.6] (unverified [10.0.4.6]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 7048-1713362 for ; Mon, 23 Sep 2013 18:46:53 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <20130922210228.GJ17308@homerow> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QKsEKSnw - 26a079884a17 - 20130923 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:84394 Archived-At: On 9/22/2013 11:02 PM, Marco Patzer wrote: > Hi, > > a couple of times the question came up=B9=B2=B3 how to create more > intelligent referencing. There are already mechanisms in the core, > namely \somewhere and \atpage but they both have drawbacks. > \somewhere happily prints its text if the figure is placed on the > same double page. In fact, no text at all should be printed if the > figure is visible. Furthermore it's a little verbose to use unless > hidden in a custom macro. \atpage on the other hand doesn't hesitate > to print =93see figure 1.2 at page 42=94 while you're on page 42. Just wondering .. did you look at \atpage? there is some info available = about reference locations > I'm aware that automatic generation of reference text is problematic > since the text depends on the placement of floats which in turn > depends on the text which might result in oscillation. I'm not sure > how likely this is to occur in practice. > > I don't know if there's interest in integrating such functionality > into the core. I attached some code, a new macro \smartref, which > takes the same arguments as \in. > > \smartref{figure}[fig:somefigure] > > - it prints the reference if it is on the same page > (e.g. Figure 1.2) > > - it prints the reference and a customizable text if the reference > is on the next/previous page (e.g. Figure 1.2 on the previous page) > > - it prints the reference and the page if the reference is further > away than one page (e.g. Figure 1.2 on page 42) > > - it adapts to single-sided and double-sided layouts > > > Marco > > =B9 http://thread.gmane.org/gmane.comp.tex.context/65295 > =B2 http://thread.gmane.org/gmane.comp.tex.context/59455 > =B3 http://thread.gmane.org/gmane.comp.tex.context/76001 > > > > _________________________________________________________________________= __________ > 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-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ > -- = ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________