From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84399 Path: news.gmane.org!not-for-mail From: Robert Blackstone Newsgroups: gmane.comp.tex.context Subject: Re: Conditional float references Date: Tue, 24 Sep 2013 13:37:40 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1380022672 27688 80.91.229.3 (24 Sep 2013 11:37:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Sep 2013 11:37:52 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 24 13:37:55 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 1VOQwB-00025X-Ut for gctc-ntg-context-518@m.gmane.org; Tue, 24 Sep 2013 13:37:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 160C3101DE; Tue, 24 Sep 2013 13:35:45 +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 qccJNDMEATC0; Tue, 24 Sep 2013 13:35:42 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 087E3101E5; Tue, 24 Sep 2013 13:35:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A4B1101E5 for ; Tue, 24 Sep 2013 13:35:40 +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 eXyNHvXgcsga for ; Tue, 24 Sep 2013 13:35:38 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 85D28101DE for ; Tue, 24 Sep 2013 13:35:38 +0200 (CEST) Original-Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r8OBbhM0001930 for ; Tue, 24 Sep 2013 13:37:43 +0200 Original-Received: by mail-we0-f172.google.com with SMTP id w61so4389574wes.17 for ; Tue, 24 Sep 2013 04:37:43 -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; bh=F4V+j6IdmA3/a4rpLPWNeDK7lNBQg8Ej9aTYRPR/CXY=; b=U/BmUxN3Wq9ZdXeNfC2zKO4Q0BnaGHY7Xma9u6LpD9OXsBCgoKQCe3G3T6CRPshRPp B7wAHTZmCuX0bogn0/uREyPeYuvxdp438lWy2Szo8fyqewaKUPryorXjTHqlB92b4obk eibRnphEtUWD4CxZGLN2ianGzwZTckaxODb9jvtmJdM/+HSgKekqPt439bSuH+O1HcbR ctDD3FZMKrYrm9vUcfTWQpFkI7dLtXEfJqpPWM39cB4EcYW67Av+EiD7Rbi7496wTlBC cFepfRgFbAgLOmJlAvDSwP3aPqA4NclxBRVZHR+3lvATKniZkVRsdiXm6153yEfah/d8 QWNw== X-Received: by 10.194.11.67 with SMTP id o3mr22363453wjb.0.1380022663440; Tue, 24 Sep 2013 04:37:43 -0700 (PDT) Original-Received: from [10.0.1.4] (ip51cc7044.adsl-surfen.hetnet.nl. [81.204.112.68]) by mx.google.com with ESMTPSA id l9sm6644955wif.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 24 Sep 2013 04:37:42 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1510) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c03::22c; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03KsXBHEQ - a7c9d08536c5 - 20130924 (trained as not-spam) 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:84399 Archived-At: On 23 Sep 2013, at 09:57 , Marco Patzer wrote: > Subject: [NTG-context] Conditional float references > = > a couple of times the question came up??? how to create more > intelligent referencing. = > [=85.] > 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. > = Hi Marco, = I would be very interested in being able to use this macro, integrated or n= ot, since in my project there are numerous figures with lots of references = to them throughout the entire text, and \at{page}[] is not satisfactory for= me. I tried the code you supplied by pasting the whole lot into a TeXShop-file,= and, when that did not work, in Alphax, processing the latter from Termin= al, but in both cases I received an error message that I do not know what t= o do with. Strangely enough it complains about an error in line 1 even if t= hat contains a commented out comment. I reproduce the error message here, hoping that you, or somebody elsm, can= see what I did wrong. = (I apologize on behalf of TeXShop and Alhax for the length of this message.) Thanks in advance for any help. Robert Blackstone Error message: ---------------------------------------------------------------------------= --------------------------------- Last login: Tue Sep 24 09:02:03 on ttys000 sh: /Users/robertblackstone/context/tex/setuptex: No such file or directory iMac-Bergen-R-5:context-minimal-24-09 robertblackstone$ . /Users/robertblac= kstone/context-minimal-24-09/tex/setuptex Setting "/Users/robertblackstone/context-minimal-24-09/tex" as ConTeXt root. iMac-Bergen-R-5:context-minimal-24-09 robertblackstone$ context /Users/robe= rtblackstone/Dropbox/C-tests/Referencing-Smart_referencing/Referencing-Smar= t_referencing-test1.tex mtx-context | run 1: luatex --fmt=3D"/Users/robertblackstone/context-mi= nimal-24-09/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb15= 56f32e/formats/luatex/cont-en" --jobname=3D"Referencing-Smart_referencing-t= est1" --lua=3D"/Users/robertblackstone/context-minimal-24-09/tex/texmf-cach= e/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont= -en.lui" --no-parse-first-line --c:currentrun=3D1 --c:fulljobname=3D"/Users= /robertblackstone/Dropbox/C-tests/Referencing-Smart_referencing/Referencing= -Smart_referencing-test1.tex" --c:input=3D"/Users/robertblackstone/Dropbox/= C-tests/Referencing-Smart_referencing/Referencing-Smart_referencing-test1.t= ex" --c:kindofrun=3D1 --c:maxnofruns=3D8 "cont-yes.mkiv" This is LuaTeX, Version beta-0.76.0-2013040508 (rev 4627) = \write18 enabled. (/Users/robertblackstone/context-minimal-24-09/tex/texmf-context/tex/contex= t/base/cont-yes.mkiv ConTeXt ver: 2013.09.21 13:53 MKIV beta fmt: 2013.9.24 int: english/engl= ish system > 'cont-new.mkiv' loaded (/Users/robertblackstone/context-minimal-24-09/tex/texmf-context/tex/contex= t/base/cont-new.mkiv) system > files > jobname 'Referencing-Smart_referencing-test1', in= put '/Users/robertblackstone/Dropbox/C-tests/Referencing-Smart_referencing/= Referencing-Smart_referencing-test1', result 'Referencing-Smart_referencing= -test1' fonts > latin modern fonts are not preloaded languages > language 'en' is active (/Users/robertblackstone/Dropbox/C-tests/Referencing-Smart_referencing/Refe= rencing-Smart_referencing-test1.tex ! Parameters must be numbered consecutively. system > tex > error on line 1 in file /Users/robertblackstone/Dro= pbox/C-tests/Referencing-Smart_referencing/Referencing-Smart_referencing-te= st1.tex: Parameters must be numbered consecutively ... 1 >> \unprotect 2 \unexpanded\def\strc_references_smart 3 {\strc_references_start_goto 4 \let\currentreferencecontent\currentreferencedefault 5 \strc_references_pickup_smart_goto} 6 \def\strc_references_pickup_smart_goto 7 {\dodoublegroupempty\strc_references_pickup_goto_smart_indeed} 8 \starttexdefinition strc_references_pickup_goto_smart_indeed #left#r= ight#dummy[#label] 9 \leftreferencetoks 10 \iffirstargument 11 {#left} = l l.1 ...ferences_pickup_goto_smart_indeed\endcsname#l eft#right#dummy[#label] \ctxcommand #1i-\directlua {commands.#1} = \syst_helpers_start_tex_definition_two ...n("#1")} {#2} l.32 \stoptexdefinition = ? = ---------------------------------------------------------------------------= --------------------------------- ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________