From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.devel Subject: BibTeX issues Date: Tue, 27 Aug 2019 10:40:04 +0200 Message-ID: <87mufv2e9s.fsf@uni-bielefeld.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="244371"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.3.4; emacs 26.1.91 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 27 10:41:20 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i2X2U-0011Pk-SY for ged-emacs-devel@m.gmane.org; Tue, 27 Aug 2019 10:41:19 +0200 Original-Received: from localhost ([::1]:48212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2X2T-0000dY-B3 for ged-emacs-devel@m.gmane.org; Tue, 27 Aug 2019 04:41:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38864) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2X1N-0000dF-GF for emacs-devel@gnu.org; Tue, 27 Aug 2019 04:40:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2X1M-0008R4-8C for emacs-devel@gnu.org; Tue, 27 Aug 2019 04:40:09 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:38495) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i2X1M-0008Ps-01 for emacs-devel@gnu.org; Tue, 27 Aug 2019 04:40:08 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 64C1E2220E for ; Tue, 27 Aug 2019 04:40:06 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 27 Aug 2019 04:40:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=fm1; bh=5JNOGRGWE0HX17Mf5TYJ1kNKVJ h4M5FSsAdBQbZ4Efg=; b=W1GwI0M3wXyVn3yYb6Y3xjgVQgrEYqzeRxv9cvWnjk NmlcCqNHHRO4WL3XpHTQ1FmVEjv3zz5wS+5MZcxL4XgYJq76uoeh2em+0Bvl/9xU JYiBYfQ6+niL2vSFwp+Qlxks2+MKsO4MNwwjf62AJVE/cxoSJo+jVXDPXMlTKkqM y82YF6a4609WgE2B6HTI9SZzoRi38COzSppUd6rsAtNRS6PKl9ziGNxvAsxisbXP JYfVg9qmpceIYm7EZdxmbIHgC7UWCHKbae2AdH6WDTH6gHAzX1Ja/0VMTyHTU/8a qxbqyFHdg+bXBfu9vNZoc6lUtl2wq71s2vSPVS7ezFhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=5JNOGR GWE0HX17Mf5TYJ1kNKVJh4M5FSsAdBQbZ4Efg=; b=fphcZEdQGpMtb03IvpbS7a 7BY+KQVMsGb/4Ueohm6goCiGRTGfvDgnaYGHENplvFlngNZzsE069h0jYTIPyAUy uzf/ZrWFMvmAasN5YWKrbllS7oU3pPKXgUPOnvg/6zCSbJKBqFULxOGED8kbu14X DN4s3Jhyetp7NB2+pBeIuqjunl7z/ojY7sgpxZcYXdVuZFObVej88XjJX9+hUBuv Oknj6VnITZK/Qfd7asRbI5tpDqdujo7UzvSf1CnrvYHefMrVx9ShIX6tNDeMpWIi e34jFcLCyOqP0ApvX0sI2PvbMecEvxUxh1pBQyeTKHqVhauPtu0bOPErnJKST52Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudehiedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegfhffvuffkffggtgfgsehtqhertd dtreejnecuhfhrohhmpeflohhoshhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgv rhhssehfrghsthhmrghilhdrfhhmqeenucfkphepleehrdeltddrvddtuddrudeknecurf grrhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhl rdhfmhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Original-Received: from IdeaPad.fastmail.com (ip5f5ac912.dynamic.kabel-deutschland.de [95.90.201.18]) by mail.messagingengine.com (Postfix) with ESMTPA id CF993D60057 for ; Tue, 27 Aug 2019 04:40:05 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.29 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239611 Archived-At: Hi all, I'm running into some issues with bibtex.el (specifically=20 `bibtex-generate-autokey`), but before I report them as bugs, I=20 wanted to ask about them here first, mainly because I'm not sure=20 whether to report them as one single bug or as separate bugs. First, `bibtex-generate-autokey` does not strip accents from=20 characters when creating a key. So if you have an author=20 `Fern=C3=A1ndez`, the key will contain the =C3=A1. This is not a problem if= =20 you use XeLaTeX or LuaLaTeX as LaTeX engine, but it is if you use=20 pdflatex. I know that stripping accents is more easily said than done, so=20 perhaps this is not really a bug at all but intended behaviour,=20 which I would understand. The other issues seem to be real problems though: First, the date field does not seem to be recognised at all. In=20 biblatex, the date field replaces the year field, in that it is=20 considered the preferred way of providing the year of publication=20 for an entry. However, even with `bibtex-dialect` set to=20 `biblatex`, only the year field is considered for the year part of=20 the autogenerated key. Second, it isn't clear to me how `bibtex-generate-autokey` handles=20 macros in titles, specifically \emph. For example, the following=20 two entries seem to be handled differently. First: @InCollection{ar=C3=A9valo13:_pa_marion, chapter =3D 2, pages =3D {49--86}, subtitle =3D {La Cumbiamba Eney=C3=A9 Returns to San Jacinto}, crossref =3D {fern=C3=A1ndez13:_cumbia}, title =3D {\emph{=C2=BFPa' d=C3=B3nde vas Marioneta? =C2=BFPa' d=C3=B3nd= e va la gaita?}}, author =3D {Ar=C3=A9valo Mateus, Jorge and Mart=C3=ADn Vejarano} } Here, `bibtex-generate-autokey` does seem to read the contents of=20 \emph, since the autogenerated key contains "pa_marion", which is=20 taken from the title. But consider the following entry: @InCollection{alarc=C3=B3n13, year =3D 2013, crossref =3D {fern=C3=A1ndez13:_cumbia}, pages =3D {213--225}, chapter =3D 9, title =3D {\emph{Feliz}, \emph{feliz}}, author =3D {Cristian Alarc=C3=B3n} } Here, the autogenerated key does not contain any title part.=20 Reducing the two \emph's to one does not change it, but deleting=20 it (so that the title is just {Feliz, feliz}), does. Then the=20 autogenerated key is "alarc=C3=B3n13:_feliz". Last, but certainly not least, doing `bibtex-clean-entry` in an=20 entry with a valid `crossref' field doesn't seem to work. Instead,=20 I get the following error: bibtex-format-entry: Alternative mandatory field =E2=80=98(date year)=E2=80= =99 is=20 missing Obviously, I made sure the cross-referenced entry does have a year=20 field. I've included the file test.bib below. Note that the first three=20 entries cross-reference the fourth entry, but they contain a year=20 field nonetheless, because, as just mentioned,=20 `bibtex-cleanup-entry' won't work without it. All this was tested on Emacs 26.1.91 with `emacs -Q'. Thank for any comments, suggestions, Joost =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @InCollection{damico13:_cumbia_music_colom, year =3D 2013, chapter =3D 1, subtitle =3D {Origins, Transformations, and Evolution of a=20 Coastal Music Genre}, pages =3D {29--48}, crossref =3D {fern=C3=A1ndez13:_cumbia}, title =3D {Cumbia Music in Colombia}, author =3D {Leonardo D'Amico} } @InCollection{ar=C3=A9valo13:_pa_marion, chapter =3D 2, pages =3D {49--86}, subtitle =3D {La Cumbiamba Eney=C3=A9 Returns to San Jacinto}, crossref =3D {fern=C3=A1ndez13:_cumbia}, title =3D {\emph{=C2=BFPa' d=C3=B3nde vas Marioneta? =C2=BFPa' d=C3=B3nd= e va la gaita?}}, author =3D {Ar=C3=A9valo Mateus, Jorge and Mart=C3=ADn Vejarano} } @InCollection{alarc=C3=B3n13, year =3D 2013, crossref =3D {fern=C3=A1ndez13:_cumbia}, pages =3D {213--225}, chapter =3D 9, title =3D {\emph{Feliz}, \emph{feliz}}, author =3D {Cristian Alarc=C3=B3n} } @Collection{fern=C3=A1ndez13:_cumbia, editor =3D {Fern=C3=A1ndez L'Hoeste, H=C3=A9ctor and Pablo Vila}, title =3D {Cumbia!}, year =3D 2013, subtitle =3D {scenes of a migrant Latin American music genre}, publisher =3D {Duke University Press}, location =3D {Durham}, isbn =3D {978-0-8223-5433-8}, pagetotal =3D 312 } @Comment Local Variables: @Comment bibtex-dialect: biblatex @Comment End: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 Joost Kremers Life has its moments