andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

Support Biblatex extended name specifications #75

Closed Quintus closed 2 years ago

Quintus commented 2 years ago

Dear Andras,

Biblatex supports making name parts explicit, see § 3.4 of the Biblatx manual. This looks like this:

@Article{vhellfeld1989alg,
  author       = {given=Axel, prefix=von, family=Hellfeld},
  title        = {Sind Algorithmen schutzfähig?},
  journaltitle = {Gewerblicher Rechtsschutz und Urheberrecht},
  shortjournal = {GRUR},
  year      = {1989},
  pages     = {471-485},
  langid    = {german}}

Pandoc appearently supports this, as

---
title: Test
author: Testauthor
lang: de
---

Das ist ein Test [@vhellfeld1989alg, p. 480].

with juristische-schulung.csl yields

1. Hellfeld, GRUR 1989, 471, p. 480↩︎

Somewhat surprising is that pandoc does not print the non-dropping particle von -- maybe a bug in pandoc or me misinterpreting the CSL specification (see #74). But it does recognise the family name as the family name, whereas this org file:

#+TITLE: Test
#+AUTHOR: Testauthor
#+LANGUAGE: de
#+bibliography: /tmp/mwe/mwe.bib
#+cite_export: csl /tmp/mwe/juristische-schulung.csl

Das ist ein Test. [cite:@vhellfeld1989alg p. 480]

with the same CSL file yields:

1 given=Axel, GRUR 1989, 471 (480)

which is in any case wrong.

citeproc.el at e6b3f160dbe87d035cbee6c61bcfdd063f56b1cb. Org mode version 9.5 (release_9.5-225-g494c20 @ /home/quintus/.emacs.d/org-mode/lisp/).

andras-simonyi commented 2 years ago

I've just merged a PR (#83) which implements this. Prefixes in this format are considered non-dropping particles by default, but, similarly to biblatex and Pandoc I believe, this can be explicitly set by using useprefix=false (for dropping) or useprefix=true (for non-dropping) in the name specification.

Quintus commented 2 years ago

Thank you again. I can confirm it works now as expected. I didn’t knew about useprefix, but it makes sense to me.