From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71783 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Include section number in reference Date: Sat, 15 Oct 2011 17:03:31 +0200 Message-ID: <59A6BCF2-10EC-4019-9A72-A8DC10C37703@googlemail.com> References: <20111012154914.7bce82ab@glyph> <20111013223644.033d2fca@glyph> <20111014131836.1b6d354c@glyph> <2341794D-96AF-4512-AC58-046D4A9DB9EE@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1318691030 8187 80.91.229.12 (15 Oct 2011 15:03:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 15 Oct 2011 15:03:50 +0000 (UTC) Cc: Marco To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Oct 15 17:03:46 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 1RF5m5-0003eb-UW for gctc-ntg-context-518@m.gmane.org; Sat, 15 Oct 2011 17:03:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4F7CBCB02B; Sat, 15 Oct 2011 17:03: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 vLmvgxa+6EP2; Sat, 15 Oct 2011 17:03:41 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 65288CB016; Sat, 15 Oct 2011 17:03:41 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7A488CB016 for ; Sat, 15 Oct 2011 17:03:39 +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 TdruXJltItDm for ; Sat, 15 Oct 2011 17:03:37 +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 82A5ACA680 for ; Sat, 15 Oct 2011 17:03:37 +0200 (CEST) Original-Received: from mail-ey0-f169.google.com (mail-ey0-f169.google.com [209.85.215.169]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p9FF3aqQ023708 for ; Sat, 15 Oct 2011 17:03:37 +0200 Original-Received: by eye4 with SMTP id 4so2485909eye.14 for ; Sat, 15 Oct 2011 08:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=qBXrXf1tfbWVHDATF5THyFAJkZGp408PXpIKcCnf99Y=; b=vabOLZkI+Dlo9wqQIO/nbwV159rE5unfhpVazOMn1z8rNKaOXZas80SnXgHsrfS+CV n1uAXsPZ9uKJHkD2hX8v57OJp/fPZtsw7+p2E8gFbHMXfaUYTR5AlF5PhtC7F9y45cNO dRSLcpSykNcQ24dQvYGYC600o6Qi1WScoCQUs= Original-Received: by 10.223.62.15 with SMTP id v15mr11535909fah.22.1318691016530; Sat, 15 Oct 2011 08:03:36 -0700 (PDT) Original-Received: from [192.168.2.34] (p5482D13A.dip.t-dialin.net. [84.130.209.58]) by mx.google.com with ESMTPS id o16sm10852600fag.21.2011.10.15.08.03.33 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 15 Oct 2011 08:03:35 -0700 (PDT) In-Reply-To: <2341794D-96AF-4512-AC58-046D4A9DB9EE@googlemail.com> X-Mailer: Apple Mail (2.1244.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.215.169; 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: 0rFJ33AMO - ba34fc10021b - 20111015 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:71783 Archived-At: Am 14.10.2011 um 13:28 schrieb Wolfgang Schuster: > = > Am 14.10.2011 um 13:18 schrieb Marco: > = >> On 2011-10-13 Wolfgang Schuster wrote: >> = >>> \setupreferencestructureprefix[default][prefixsegments=3D2:*] >> = >> Thanks. >> = >> Wikified. (Although without explanations, just an example) > = > = > I can also provide the entry from my command reference (no yet in the PDF= ): > = > \setupreferencestructureprefix[.1.][.2.][..,.3.,..] > optional > = > 1. IDENTIFIER (float, formula, figure, SECTION (e.g. section, subsection,= =85), =85) > 2. number, page, title, text or default > 3. prefix =3D yes (default), no > prefixseparatorset =3D IDENTIFIER > prefixconversionset =3D IDENTIFIER > prefixset =3D IDENTIFIER > prefixsegments =3D SEGMENTS > prefixconnector =3D TEXT Below I describe the values of the three arguments. The first (and optional) argument can be used to specify the element, where you want to customize the reference. When you use =93float=94 the set= ting affects all kind of floats which are created with \definefloat but you also change only certain float type when you use the name of the float, e.g. figure or table. When you want to change the layout for a heading you need the name of it, e.g. chapter or section (not sure about this because I haven=92t checked this). The second argument specifies the reference type, you can the values of these types in the following example. When you refer to a section or float with \in context uses the =93default=94 type and when you use \at it uses the =93page=94 type. \startsetups[reference:table] \starttabulate \NC \bf key \EQ \bf value \NC\NR \NC number \EQ \currentreferencenumber \NC\NR \NC page \EQ \currentreferencepage \NC\NR \NC title \EQ \currentreferencetitle \NC\NR \NC text \EQ\currentreferencetext \NC\NR \NC default \EQ \currentreferencedefault \NC\NR \NC realpage \EQ \currentreferencerealpage \NC\NR \stoptabulate \stopsetups \definereferenceformat[referencetable][setups=3Dreference:table] \starttext \section[sec:table]{Values for the reference command} \starttyping \startsection[reference=3Dsec:table,title=3D{Values for the reference comma= nd}] \stoptyping \referencetable[sec:table] \startbuffer \reference[ref:test]{Is this the text or the title?} \stopbuffer \getbuffer \typebuffer \referencetable[ref:test] \stoptext With the third argument you can control which prefixes (section numbers which are shown in front of a floats own counter value) are shown and how they should be formatted. 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 ___________________________________________________________________________= ________