unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Roland Winkler <winkler@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: BibTeX issues
Date: Wed, 28 Aug 2019 12:45:33 -0500	[thread overview]
Message-ID: <87ftllji9u.fsf@gnu.org> (raw)
In-Reply-To: 87mufv2e9s.fsf@uni-bielefeld.de

On Tue, Aug 27 2019, Joost Kremers wrote:
> 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.

Stripping accents is really not a matter specific to BibTeX.
(I vaguely remember there was a thread on this list discussing this
topic some time ago.)

If there was a generic function strip-accents, then BibTeX mode could
certainly use it within its bibtex-generate-autokey machinery.

> 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.

How about allowing the possibility that the first arg FIELD of
bibtex-autokey-get-field can also be a list of fields so that the
elements can be treated as alternatives?  Assuming that a bib(la)tex
entry has either a year or a date field, then bibtex-autokey-get-year
could use one or the other.

If you really want your own thing, you can also have a custom
bibtex-autokey-before-presentation-function that ignores its arg.

> Second, it isn't clear to me how `bibtex-generate-autokey` handles
> macros in titles, specifically \emph.

I never had such a problem.  Details probably depend on your use cases.
A generic parser for LaTeX code that can drop such things is probably
not all trivial.  (But maybe something of that kind exists alread (at
some level) for auctex or org mode or some other package?)

Also, you can always customize bibtex-autokey-titleword-change-strings.

> 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

I am not a biblatex expert.  Since BibTeX mode picked up biblatex
support in 2013, it has treated the alternative fields date and year as
mandatory, see the default of bibtex-biblatex-entry-alist.  Do you say
that these fields should be treated as crossref fields instead?

Roland




  reply	other threads:[~2019-08-28 17:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27  8:40 BibTeX issues Joost Kremers
2019-08-28 17:45 ` Roland Winkler [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftllji9u.fsf@gnu.org \
    --to=winkler@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).