From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91626 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.comp.tex.context Subject: Re: [BUG]: `referenceprefix' in `\setuphead' ruins `\cite' Date: Fri, 29 May 2015 17:55:41 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0035189552==" X-Trace: ger.gmane.org 1432915000 9150 80.91.229.3 (29 May 2015 15:56:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2015 15:56:40 +0000 (UTC) To: ntg-context Original-X-From: ntg-context-bounces@ntg.nl Fri May 29 17:56:28 2015 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 1YyMe3-0002uY-Bi for gctc-ntg-context-518@m.gmane.org; Fri, 29 May 2015 17:56:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 85A6710223 for ; Fri, 29 May 2015 17:56:26 +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 HkKpxNTIokDS for ; Fri, 29 May 2015 17:56:25 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8146F1022F for ; Fri, 29 May 2015 17:55:57 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 37DCA101F7 for ; Fri, 29 May 2015 17:55:54 +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 ZV-5rCw9aZck for ; Fri, 29 May 2015 17:55:52 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id DE9DC101F6 for ; Fri, 29 May 2015 17:55:43 +0200 (CEST) Original-Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t4TFtghW013137 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 29 May 2015 17:55:42 +0200 Original-Received: by lbbqq2 with SMTP id qq2so51256916lbb.3 for ; Fri, 29 May 2015 08:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=O0Kj/Wm87h1YYj7SNS0i1UnWqGanzO6gFHAfG9rLw3o=; b=mBoNcE4SpSa9HJSW2cDdKRHjXbV9ZHGF97rKTaj/r3Vhk2JWaO2fXY4nTXfFmRgxbB 0bIwyuOggR5HBCczPH9nqjyDAYZdTmpeOZrD1hx0hcZ1zRRSDn0KxS9GHY8BkaQ+J/ZJ P5ZRhhLbFrFMmc98wduQxbCubriEv5T/4YOEkmS7/z1v/7184qbAId6dCOZ3H/hKzGGk SCmrmq8IogBk1JmugS7WnRR7PT/ZvX68ysBe6ZvYS3WMAFm1P51sooVIhEw3yPvCeY17 yrkkNiBC11J80zWGxPQjy914YMEVew0bkTg9lsf8QPtZdEeoNeKJ/3EkW07BgeQGWZti uv5w== X-Received: by 10.152.87.204 with SMTP id ba12mr8882163lab.35.1432914941946; Fri, 29 May 2015 08:55:41 -0700 (PDT) Original-Received: by 10.112.36.103 with HTTP; Fri, 29 May 2015 08:55:41 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:4010:c04::233; country=FI; region=South Karelia; city=Lappeenranta; latitude=61.0667; longitude=28.1833; http://maps.google.com/maps?q=61.0667,28.1833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TOxPTGvK - f913b81323e0 - 20150529 (trained as not-spam) Received-SPF: pass (filter2-til.mf.surf.net: domain of haroogan@gmail.com designates 2a00:1450:4010:c04::233 as permitted sender) receiver=filter2-til.mf.surf.net; client-ip=2a00:1450:4010:c04::233; envelope-from=; helo=mail-lb0-x233.google.com; identity=mailfrom 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:91626 Archived-At: --===============0035189552== Content-Type: multipart/alternative; boundary=001a11c364a61bb27905173a820f --001a11c364a61bb27905173a820f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, May 29, 2015 at 5:20 PM, Alexander Shukaev wrote: > Hello, > > I think I've experienced a severe bug here. Consider the following: > > =E2=80=8B=E2=80=8B > \setuphead > [chapter][% > referenceprefix=3D{chapter}, > ] > > ... > \cite[xxx] > ... > > \startpublication[ > k=3D{xxx}, > t=3D{...}, > a=3D{...}, > y=3D{...}, > ] > ... > \stoppublication > > > \startchapter > [title=3D{BIBLIOGRAPHY}] > > \whitespace > \placepublications > > \stopchapter > > will render [[error 2]] in place of `\cite[xxx]' because of > `referenceprefix' in `\setuphead'. Why? I don't believe `referenceprefi= x' > in `\setuphead' should have something to do with `\cite' at all. > > Thankfully, it's pretty rare that one uses `chapter' for bibliography, bu= t > still I think it's better to fix this. For instance, right now the > following works fine for me: > > \setuphead > [chapter][% > referenceprefix=3D{chapter}, > ] > > =E2=80=8B=E2=80=8B > \setuphead > [title][% > referenceprefix=3D{}, > ] > > ... > \cite[xxx] > ... > > \startpublication[ > k=3D{xxx}, > t=3D{...}, > a=3D{...}, > y=3D{...}, > ] > ... > \stoppublication > > > \starttitle > [title=3D{BIBLIOGRAPHY}] > > \whitespace > \placepublications > > \stoptitle > > NOTE: It's extremely important to explicitly do `referenceprefix=3D{}' fo= r > `title' because somehow `title' inherits `referenceprefix=3D{chapter}' fr= om > `chapter'; and therefore, not doing `referenceprefix=3D{}' will again res= ult > in [[error 2]] in place of `\cite[xxx]'. > > Looking forward to your feedback. > > Kind regards, > Alexander > =E2=80=8BIt seems to be even worse. It's enough to simple have `chapter' s= omewhere to trigger the bug (no necessary to put `chapter' around `\placepublications': =E2=80=8B=E2=80=8B\setuphead [chapter][% referenceprefix=3D{chapter}, ] =E2=80=8B \setuphead [title][% referenceprefix=3D{}, ] ... \cite[xxx] ... \startchapter [title=3D{Chapter}] \stopchapter \startpublication[ k=3D{xxx}, t=3D{...}, a=3D{...}, y=3D{...}, ] ... \stoppublication \placepublications will result in [[error 2]] again, and there seems to be no workaround. --001a11c364a61bb27905173a820f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, May 29, 2015 at 5:2= 0 PM, Alexander Shukaev <ha= roogan@gmail.com> wrote:
= Hello,

I think I've experienced a severe bug here.=C2=A0 = Consider the following:

=E2=80=8B=E2=80=8B
\setuph= ead
[chapter][%
=C2=A0 referenceprefix=3D{chapter},
]
<= br>
...
\cite[xxx]
...

\startpublication[
=C2=A0 k=3D{xxx},
= =C2=A0 t=3D{...},
=C2=A0 a=3D{...},
=C2=A0 y=3D{...},
]
...
\stoppublication


\startchapter
[t= itle=3D{BIBLIOGRAPHY}]

=
\whitespace
\placepublications

\stopchapter

will render [[error 2]] in place of `\cite[xxx]' because of `= referenceprefix' in `\setuphead'.=C2=A0 Why?=C2=A0 I don't beli= eve `referenceprefix' in `\setuphead' should have something to do w= ith `\cite' at all.

Thankfully, it's pretty rare that= one uses `chapter' for bibliography, but still I think it's better= to fix this.=C2=A0 For instance, right now the following works fine for me= :

\setuphead
[chapter][%
=C2=A0 refe= renceprefix=3D{chapter},
]

=E2=80= =8B=E2=80=8B
\setuphead
[title][%
=C2=A0 reference= prefix=3D{},
]

...
\cite= [xxx]
...

\startpublication[
= =C2=A0 k=3D{xxx},
=C2=A0 t=3D{...},
=C2=A0 a=3D{...},
=C2=A0 y=3D{...},
]
...
\stoppublica= tion


\starttitle
[title= =3D{BIBLIOGRAPHY}]

\whitespace
\placepub= lications

\stoptitle

NOTE= : It's extremely important to explicitly do `referenceprefix=3D{}' = for `title' because somehow `title' inherits `referenceprefix=3D{ch= apter}' from `chapter'; and therefore, not doing `referenceprefix= =3D{}' will again result in [[error 2]] in place of `\cite[xxx]'.

Looking forward to your feedback.

Kind regards,
Alexander

=E2=80=8BIt seems to be even wors= e.=C2=A0 It's enough to simple have `chapter' somewhere to trigger = the bug (no necessary to put `chapter' around `\placepublications':=

= =E2=80=8B=E2=80=8B\setuphead
[chapter][%
=C2=A0 r= eferenceprefix=3D{chapter},
= ]
<= font face=3D"monospace">
=E2=80=8B
\setuphead
[title][%
=C2=A0 referenceprefix=3D{},
]

...
\cite[xxx]
<= div class=3D"gmail_default" style>...
=

\startchapter
[title=3D{Chapter}]
\stopchapter

\startpublication[
=C2=A0 k=3D{xxx},
=
=C2=A0 t=3D{...= },
= =C2=A0 a=3D{...},
=C2=A0 y=3D{...},
]
...
\stoppublication

\placepublications

will result in [[error 2]] again, and ther= e seems to be no workaround.
--001a11c364a61bb27905173a820f-- --===============0035189552== 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= --===============0035189552==--