From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72568 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: referencing Date: Sun, 20 Nov 2011 21:37:05 +0100 Message-ID: <3851FA3E-027F-4618-8E49-732BF3722856@googlemail.com> References: <34E24576-0864-4263-B44A-711118D75BEB@xs4all.nl> <40618C2C-86AE-4ED1-AD5D-3B8AE0732149@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1321821456 15513 80.91.229.12 (20 Nov 2011 20:37:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Nov 2011 20:37:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 20 21:37:32 2011 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 1RSE8p-00071H-2U for gctc-ntg-context-518@m.gmane.org; Sun, 20 Nov 2011 21:37:31 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8187DCB118; Sun, 20 Nov 2011 21:37:30 +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 SWJ9CQpKOJRG; Sun, 20 Nov 2011 21:37:27 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DCA0CCB113; Sun, 20 Nov 2011 21:37:27 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D2281CB113 for ; Sun, 20 Nov 2011 21:37:25 +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 UX4h9FERF-51 for ; Sun, 20 Nov 2011 21:37:14 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 98A9CCB10D for ; Sun, 20 Nov 2011 21:37:14 +0100 (CET) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pAKKb8Go018748 for ; Sun, 20 Nov 2011 21:37:10 +0100 Original-Received: by bke17 with SMTP id 17so7452947bke.14 for ; Sun, 20 Nov 2011 12:37:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=CQ/Tr8/xaN08rkSwuvuOPrnFdMswofMbkmii3d0n9Sc=; b=aUYAwS6goWt8V77nialpIWjBnLlODKfutYzNtgQVSYz+6kWXwh2YbuPvIiqQWQUmA3 FrchY4ZgwALnqV2dSQpYM/4huu7aptamkVWrZZkRJymSN8DXx7ZPrGDJ1+eprMGdsVwy n1hijkcN+TKS2oqx04TacY58CifgrK1Xp7waU= Original-Received: by 10.204.154.1 with SMTP id m1mr11472472bkw.107.1321821428079; Sun, 20 Nov 2011 12:37:08 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFC6A0.dip.t-dialin.net. [87.175.198.160]) by mx.google.com with ESMTPS id y2sm13271525fag.12.2011.11.20.12.37.06 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Nov 2011 12:37:07 -0800 (PST) In-Reply-To: <40618C2C-86AE-4ED1-AD5D-3B8AE0732149@uva.nl> X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05FXwB8bD - 8512f35b3259 - 20111120 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 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:72568 Archived-At: Am 20.11.2011 um 21:26 schrieb Meer, H. van der: > Thanks Wolfgang for the code. = > = > Just in case it is of use I concocted my variation on this theme. Now thi= s simply replaces the \in, \at and \about macro's with one that does not sh= ow on the page where the link originates, but behaves as of old everywhere = else. I introduced the unskip in order to remove the space that ruins the e= nd of a line when there is nothing to display. For example from \in{see the= re}[ref]. <--this period would otherwise acquire a space before it. Instead of \unskip you should use \removeunwantedspaces which does a check = before it calls \unskip. > \def\SamePageDo#1[#2]% > {\doifreferencefoundelse{#2} > {\ifnum\referencepagestate=3D1 > \unskip%\unknown % reference is on the same page > \else > #1[#2]% > \fi} > {\unskip}} % reference not found > \let\oldin=3D\in > \let\oldat=3D\at > \let\oldabout=3D\about > \def\in{\SamePageDo\oldin} > \def\at{\SamePageDo\oldat} > \def\about{\SamePageDo\oldabout} Don=92t redefine \in, at and \about because all three commands can also be = used in math mode where they have a different meaning but with your redefin= ition they can=92t be used anymore for math. Wolfgang ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________