unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* BibTeX issues
@ 2019-08-27  8:40 Joost Kremers
  2019-08-28 17:45 ` Roland Winkler
  0 siblings, 1 reply; 16+ messages in thread
From: Joost Kremers @ 2019-08-27  8:40 UTC (permalink / raw)
  To: emacs-devel

Hi all,

I'm running into some issues with bibtex.el (specifically 
`bibtex-generate-autokey`), but before I report them as bugs, I 
wanted to ask about them here first, mainly because I'm not sure 
whether to report them as one single bug or as separate bugs.

First, `bibtex-generate-autokey` does not strip accents from 
characters when creating a key. So if you have an author 
`Fernández`, the key will contain the á. This is not a problem if 
you use XeLaTeX or LuaLaTeX as LaTeX engine, but it is if you use 
pdflatex.

I know that stripping accents is more easily said than done, so 
perhaps this is not really a bug at all but intended behaviour, 
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 
biblatex, the date field replaces the year field, in that it is 
considered the preferred way of providing the year of publication 
for an entry. However, even with `bibtex-dialect` set to 
`biblatex`, only the year field is considered for the year part of 
the autogenerated key.

Second, it isn't clear to me how `bibtex-generate-autokey` handles 
macros in titles, specifically \emph. For example, the following 
two entries seem to be handled differently. First:

@InCollection{arévalo13:_pa_marion,
  chapter =	 2,
  pages =	 {49--86},
  subtitle =	 {La Cumbiamba Eneyé Returns to San Jacinto},
  crossref =	 {fernández13:_cumbia},
  title =	 {\emph{¿Pa' dónde vas Marioneta? ¿Pa' dónde va la
                  gaita?}},
  author =	 {Arévalo Mateus, Jorge and Martín Vejarano}
}

Here, `bibtex-generate-autokey` does seem to read the contents of 
\emph, since the autogenerated key contains "pa_marion", which is 
taken from the title. But consider the following entry:

@InCollection{alarcón13,
  year =	 2013,
  crossref =	 {fernández13:_cumbia},
  pages =	 {213--225},
  chapter =	 9,
  title =	 {\emph{Feliz}, \emph{feliz}},
  author =	 {Cristian Alarcón}
}

Here, the autogenerated key does not contain any title part. 
Reducing the two \emph's to one does not change it, but deleting 
it (so that the title is just {Feliz, feliz}), does. Then the 
autogenerated key is "alarcón13:_feliz".

Last, but certainly not least, doing `bibtex-clean-entry` in an 
entry with a valid `crossref' field doesn't seem to work. Instead, 
I get the following error:

bibtex-format-entry: Alternative mandatory field ‘(date year)’ is 
missing

Obviously, I made sure the cross-referenced entry does have a year 
field.

I've included the file test.bib below. Note that the first three 
entries cross-reference the fourth entry, but they contain a year 
field nonetheless, because, as just mentioned, 
`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




========================================

@InCollection{damico13:_cumbia_music_colom,
  year =	 2013,
  chapter =	 1,
  subtitle =	 {Origins, Transformations, and Evolution of a 
  Coastal
                  Music Genre},
  pages =	 {29--48},
  crossref =	 {fernández13:_cumbia},
  title =	 {Cumbia Music in Colombia},
  author =	 {Leonardo D'Amico}
}

@InCollection{arévalo13:_pa_marion,
  chapter =	 2,
  pages =	 {49--86},
  subtitle =	 {La Cumbiamba Eneyé Returns to San Jacinto},
  crossref =	 {fernández13:_cumbia},
  title =	 {\emph{¿Pa' dónde vas Marioneta? ¿Pa' dónde va la
                  gaita?}},
  author =	 {Arévalo Mateus, Jorge and Martín Vejarano}
}

@InCollection{alarcón13,
  year =	 2013,
  crossref =	 {fernández13:_cumbia},
  pages =	 {213--225},
  chapter =	 9,
  title =	 {\emph{Feliz}, \emph{feliz}},
  author =	 {Cristian Alarcón}
}

@Collection{fernández13:_cumbia,
  editor =	 {Fernández L'Hoeste, Héctor and Pablo Vila},
  title =	 {Cumbia!},
  year =	 2013,
  subtitle =	 {scenes of a migrant Latin American music genre},
  publisher =	 {Duke University Press},
  location =	 {Durham},
  isbn =	 {978-0-8223-5433-8},
  pagetotal =	 312
}


@Comment Local Variables:
@Comment bibtex-dialect: biblatex
@Comment End:

========================================


-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-08-31  6:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27  8:40 BibTeX issues Joost Kremers
2019-08-28 17:45 ` Roland Winkler
2019-08-28 18:45   ` Eli Zaretskii
2019-08-29  3:26     ` strip accents and sorting [was: BibTeX issues] Roland Winkler
2019-08-29  6:15       ` martin rudalics
2019-08-30 16:27         ` Roland Winkler
2019-08-30 17:51           ` Eli Zaretskii
2019-08-30 18:38             ` Eli Zaretskii
2019-08-30 19:09               ` Roland Winkler
2019-08-30 19:19                 ` Eli Zaretskii
2019-08-30 19:49                   ` Roland Winkler
2019-08-31  6:45                     ` Eli Zaretskii
2019-08-29  7:10       ` Eli Zaretskii
2019-08-30 16:29         ` Roland Winkler
2019-08-29  7:49   ` BibTeX issues Joost Kremers
2019-08-30 19:18     ` Roland Winkler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).