From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88905 Path: news.gmane.org!not-for-mail From: Christoph Reller Newsgroups: gmane.comp.tex.context Subject: Re: Automatic reference prefixing in heads with prefix=+ broken? Date: Sun, 12 Oct 2014 18:18:55 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0643970707==" X-Trace: ger.gmane.org 1413130801 4932 80.91.229.3 (12 Oct 2014 16:20:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Oct 2014 16:20:01 +0000 (UTC) To: ntg-context Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 12 18:19:57 2014 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 1XdLsC-0005gM-HG for gctc-ntg-context-518@m.gmane.org; Sun, 12 Oct 2014 18:19:56 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1D9F810231 for ; Sun, 12 Oct 2014 18:19: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 TW883ZeOG73L for ; Sun, 12 Oct 2014 18:19:54 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 768C51023D for ; Sun, 12 Oct 2014 18:19:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E62B0101E6 for ; Sun, 12 Oct 2014 18:19:18 +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 uN0nI83rP-z2 for ; Sun, 12 Oct 2014 18:19:17 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id C4E48101E3 for ; Sun, 12 Oct 2014 18:19:17 +0200 (CEST) Original-Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s9CGJ5pi010503 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 12 Oct 2014 18:19:06 +0200 Original-Received: by mail-ig0-f177.google.com with SMTP id a13so8022417igq.10 for ; Sun, 12 Oct 2014 09:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=ZOz2CteahtIzZL4yWX8Ytl+jF2Wqg/Aes1v35+hpYbU=; b=lbSqfGSpNY+yOuDWDir+XcmNfVdh2AkGvDff3VvTjPF8Bx3iWnJiid3QDVPLmD/+E9 tsHwE4tU6PM7bgbcGjllCX+lrWhNcJ7wko0XoOTXW52aAEiXAG2S+5loDf8OTMJoCEJi Wtlrl5jEAe3W/tUGjIjjUeyzJPVfVs2MALcXRH0jh59Fxk7ZEfA0QxUePWWBsCgd70Xq f+jCV7KZarSRwX5yeOrSpkuxGmTVy23mfPziCEooCPvNWnPV3VCoHjyKSk3Bp1RpubLs I2ADF7eg183Z8tdKygRV1rTofHCne6QH1BmBDt+5TvyVHSQ/B2JD4x2X39cWath4SPQr veWg== X-Received: by 10.50.18.50 with SMTP id t18mr24343750igd.4.1413130755376; Sun, 12 Oct 2014 09:19:15 -0700 (PDT) Original-Received: by 10.107.151.82 with HTTP; Sun, 12 Oct 2014 09:18:55 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c05::231; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07N2gj6fC - fdb66f24d695 - 20141012 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:88905 Archived-At: --===============0643970707== Content-Type: multipart/alternative; boundary=089e0115f1e4b20bf305053c2447 --089e0115f1e4b20bf305053c2447 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 30, 2014 at 8:08 AM, Christoph Reller < christoph.reller@gmail.com> wrote: > On Sat, Sep 27, 2014 at 12:00 PM, Christoph Reller < > christoph.reller@gmail.com> wrote: > >> Hi, >> >> Various documents mention a namespace feature for references by setting >> prefix=+. This is a really cool feature but I cannot get it to work. Why >> does the following example not work: >> >> \setupinteraction[state=start] >> \setuphead[chapter][prefix=+] >> >> \starttext >> >> \startchapter[reference=chap1,title={First Chapter}] >> \startsection[reference=sec1,title={First Section in First Chapter}] >> Reference \type{sec1} is \about[sec1].\par >> Reference \type{chap2:sec1} is \about[chap2:sec1].\par >> \stopsection >> \stopchapter >> >> \startchapter[reference=chap2,title={Second Chapter}] >> \startsection[reference=sec1,title={First Section in Second Chapter}] >> Reference \type{sec1} is \about[sec1].\par >> Reference \type{chap1:sec1} is \about[chap1:sec1].\par >> \stopsection >> \stopchapter >> >> \stoptext >> >> Any help is appreciated. >> >> Christoph Reller >> > > Does anybody have a minimal working example on this topic? Because of the > concise syntax "prefix=+" it is difficult to google for an example. > > This feature is mentioned in two places: > 1. contextref.pdf in section "12.5 Cross references" explains the main > mechanism but seems a little outdated. > 2. Hans Hagen, "This Way - Cross document referencing", September 2011. > This is more up to date, but mentions the feature only briefly. The > mentioned key there is not "prefix" but "referenceprefix", which doesn't > seem to work either. > > Regards, > Christoph Reller > Hi everybody Is automatic prefixing of references partially broken? I have found the following example for mkiv in the unofficial test suite ( https://github.com/melmothx/context-unofficial-test-suite): \setuphead[chapter][referenceprefix=+] \starttext \chapter[one]{Chapter One} \section[bla]{Blablabla} \chapter[two]{Chapter Two} See \in{Section}[one:bla] \stoptext The test suite also contains the output pdf with the correct reference. So there must have been a time when mkiv did resolve the reference in the above example correctly. On my ConTeXt standalone dating 2014.08.19 11:57, the above example does, however, not work. The example does only a test of "non-local" references (from within the namespace "two" to the different namespace "one"). Local references do, however, work even with my version of ConTeXt. Here is an example: \setuphead[chapter][referenceprefix=+] \starttext \startchapter[reference=chap1,title=First Chapter] \startsection[reference=sec1,title=First Section in First Chapter] Reference \type{sec1} is \about[sec1]. \stopsection \stopchapter \startchapter[reference=chap2,title=Second Chapter] \startsection[reference=sec1,title=First Section in Second Chapter] Reference \type{sec1} is \about[sec1]. \stopsection \stopchapter \stoptext But how can I now reference chap1:sec1 from withing chap2? I tried \about[chap1:sec1], but in vain. Referencing the global namespace with "-:" does, surprisingly, work. Here is an example: \setuphead[chapter][referenceprefix=+] \starttext \startsection[reference=sec1,title=Freefloating Section] \about[sec1] \stopsection \startchapter[reference=chap1,title=First Chapter] \startsection[reference=sec1,title=First Section in First Chapter] Reference \type{sec1} is \about[sec1].\par Reference \type{-:sec1} is \about[-:sec1] \stopsection \stopchapter \stoptext Any help is appreciated. Regards, Christoph Reller --089e0115f1e4b20bf305053c2447 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On T= ue, Sep 30, 2014 at 8:08 AM, Christoph Reller <christoph.reller@g= mail.com> wrote:
=
On = Sat, Sep 27, 2014 at 12:00 PM, Christoph Reller <christoph.reller= @gmail.com> wrote:
Hi,
Various documents mention a namespace feature for referen= ces by setting prefix=3D+. This is a really cool feature but I cannot get i= t to work. Why does the following example not work:

\setupinteraction[state=3Dstart]
\setuphead[chapter][prefi= x=3D+]

\starttext

\startc= hapter[reference=3Dchap1,title=3D{First Chapter}]
=C2=A0 \startse= ction[reference=3Dsec1,title=3D{First Section in First Chapter}]
= =C2=A0 =C2=A0 Reference \type{sec1} is \about[sec1].\par
=C2=A0 = =C2=A0 Reference \type{chap2:sec1} is \about[chap2:sec1].\par
=C2= =A0 \stopsection
\stopchapter

\startchap= ter[reference=3Dchap2,title=3D{Second Chapter}]
=C2=A0 \startsect= ion[reference=3Dsec1,title=3D{First Section in Second Chapter}]
= =C2=A0 =C2=A0 Reference \type{sec1} is \about[sec1].\par
=C2=A0 = =C2=A0 Reference \type{chap1:sec1} is \about[chap1:sec1].\par
=C2= =A0 \stopsection
\stopchapter

\stoptext<= /div>

Any help is appreciated.

Christoph Reller

Does an= ybody have a minimal working example on this topic? Because of the concise = syntax "prefix=3D+" it is difficult to google for an example.

This feat= ure is mentioned in two places:
1. contextr= ef.pdf in section "12.5 Cross references" explains the main mecha= nism but seems a little outdated.
2.=C2=A0= =C2=A0Hans Hagen, "This Way - Cross document referencing", Septem= ber 2011. This is more up to date, but mentions the feature only briefly. T= he mentioned key there is not "prefix" but "referenceprefix&= quot;, which doesn't seem to work either.

Regards,
Christoph Reller

Hi everybody

Is automatic prefixing of references partially broken?=
I have found the following example for mki= v in the unofficial test suite (https://github.com/melmothx/context-unofficial-t= est-suite):

\setuphead[chapter][referenceprefix=3D= +]
\starttext
\chapter[one]{Chapter One}
\sect= ion[bla]{Blablabla}
\chapter[two]{Chapt= er Two}
See \in{Section}[one:bla]
\stoptext

The t= est suite also contains the output pdf with the correct reference. So there= must have been a time when mkiv did resolve the reference in the above exa= mple correctly. On my ConTeXt standalone dating=C2=A02014.08.19 11:57, the = above example does, however, not work.

The example= does only a test of "non-local" references (from within the name= space "two" to the different namespace "one"). Local re= ferences do, however, work even with my version of ConTeXt. Here is an exam= ple:

\setuphead[chapter][referenceprefix=3D+]
\starttext
\startchapter[reference=3Dchap1,title=3DFirst Ch= apter]
=C2=A0 \startsection[reference=3Dsec1,title=3DFirst Sectio= n in First Chapter]
=C2=A0 =C2=A0 Reference \type{sec1} is \about= [sec1].
=C2=A0 \stopsection
\stopchapter
\sta= rtchapter[reference=3Dchap2,title=3DSecond Chapter]
=C2=A0 \start= section[reference=3Dsec1,title=3DFirst Section in Second Chapter]
=C2=A0 =C2=A0 Reference \type{sec1} is \about[sec1].
=C2=A0 \sto= psection
\stopchapter
\stoptext

But how can I now reference chap1:sec1 from withing chap2? I tried \about= [chap1:sec1], but in vain.

Referencing the global = namespace with "-:" does, surprisingly, work. Here is an example:=

\setuphead[chapter][referenceprefix=3D+]
\starttext
\startsection[reference=3Dsec1,title=3DFreefloa= ting Section]
=C2=A0 \about[sec1]
\stopsection
\startchapter[reference=3Dchap1,title=3DFirst Chapter]
=C2=A0 \= startsection[reference=3Dsec1,title=3DFirst Section in First Chapter]
=
=C2=A0 =C2=A0 Reference \type{sec1} is \about[sec1].\par
=C2= =A0 =C2=A0 Reference \type{-:sec1} is \about[-:sec1]
=C2=A0 \stop= section
\stopchapter
\stoptext

Any help is appreciated.

Regards,
Christoph Reller
--089e0115f1e4b20bf305053c2447-- --===============0643970707== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0643970707==--