From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97958 Path: news.gmane.org!.POSTED!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: BUG: % is comment in btx fields Date: Mon, 8 May 2017 20:15:36 -0400 Message-ID: <5bf44ae4-e4d7-a2bf-cc7e-75ca2e10d81a@rik.users.panix.com> References: <1494279841.19890.28.camel@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1449042723268496306==" X-Trace: blaine.gmane.org 1494288972 13700 195.159.176.226 (9 May 2017 00:16:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 May 2017 00:16:12 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue May 09 02:16:05 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7sou-0003RB-1F for gctc-ntg-context-518@m.gmane.org; Tue, 09 May 2017 02:16:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B5843855FD; Tue, 9 May 2017 02:15:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w1c-evNoiKyy; Tue, 9 May 2017 02:15:52 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 709A685602; Tue, 9 May 2017 02:15:52 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A735C855F6 for ; Tue, 9 May 2017 02:15:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B3ldSF3-9BJG for ; Tue, 9 May 2017 02:15:50 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 9148E855D7 for ; Tue, 9 May 2017 02:15:40 +0200 (CEST) Original-Received: from [192.168.201.10] (cpe-24-194-22-135.nycap.res.rr.com [24.194.22.135]) by mailbackend.panix.com (Postfix) with ESMTPSA id 5D95B104A0 for ; Mon, 8 May 2017 20:15:39 -0400 (EDT) In-Reply-To: <1494279841.19890.28.camel@gmail.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:97958 Archived-At: This is a multi-part message in MIME format. --===============1449042723268496306== Content-Type: multipart/alternative; boundary="------------706A9B5AB4768B9B3A565BF7" This is a multi-part message in MIME format. --------------706A9B5AB4768B9B3A565BF7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2017-05-08 17:44, Henri Menke wrote: > Dear list, > > The percent character in btx field is taken as a comment characters > which leads to the rest of the field being discarded. In the MWE > below, the URL is cut off at the % sign and everything after it is > lost. > > Cheers, Henri > > > --- > > > \startbuffer[references] > @misc{kraft, > author = "Kraft, Nathan", > title = "Mr Kraft's Virtual Filing Cabinet", > year = "2015", > url = "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+Cabi > net" > } > \stopbuffer > > \usebtxdataset[references.buffer] > \usebtxdefinitions[apa] > > \starttext > > \nocite[kraft] > \placelistofpublications > > \stoptext The bibtex entry in this example is provided in a buffer. The buffer mechanism does not handle characters any differently than other text in the file, and % in a ConTeXt buffer has to be escaped if it does not signify a comment. If you specify an external (.bib or .bibtex) file to supply the data, % does not need to be escaped. So, this part is simple user error. (With \starttext \startbuffer abc%def ghi\%jkl \stopbuffer \getbuffer \stoptext you do not get %def in the output. Why do you expect different behavior if the buffer holds a bibtex entry?) The way hyphenatedurl handles things may well be worthy of improvement. -- Rik --------------706A9B5AB4768B9B3A565BF7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 2017-05-08 17:44, Henri Menke wrote:
Dear list,

The percent character in btx field is taken as a comment characters
which leads to the rest of the field being discarded.  In the MWE
below, the URL is cut off at the % sign and everything after it is
lost.

Cheers, Henri


---


\startbuffer[references]
@misc{kraft,
  author = "Kraft, Nathan",
  title = "Mr Kraft's Virtual Filing Cabinet",
  year = "2015",
  url = "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+Cabi
net"
}
\stopbuffer

\usebtxdataset[references.buffer]
\usebtxdefinitions[apa]

\starttext

\nocite[kraft]
\placelistofpublications

\stoptext
The bibtex entry in this example is provided in a buffer. The buffer mechanism does not handle characters any differently than other text in the file, and % in a ConTeXt buffer has to be escaped if it does not signify a comment. If you specify an external (.bib or .bibtex) file to supply the data,  % does not need to be escaped. So, this part is simple user error.

(With
\starttext
\startbuffer
  abc%def

  ghi\%jkl
\stopbuffer
\getbuffer
\stoptext

you do not get %def in the output. Why do you expect different behavior if the buffer holds a bibtex entry?)

The way hyphenatedurl handles things may well be worthy of improvement.

--
Rik --------------706A9B5AB4768B9B3A565BF7-- --===============1449042723268496306== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============1449042723268496306==--