Closed alebg closed 3 months ago
Transferring to pandoc, which handles conversion from bib.
Pandoc converts the .bib into a native pandoc reference list, which is used with citeproc. You can see what it converts to by doing:
% pandoc name-particles.bib -t markdown -s
---
nocite: "[@*]"
references:
- author:
- family: van Inwagen
given: Peter
container-title: Philosophical Studies
doi: 10.1007/bf01624156
id: "vaninwagen:1975"
issue: 3
issued: 1975
page: 185-199
title: "[The incompatibility of Free Will and Determinism]{.nocase}"
type: article-journal
volume: 27
---
(I removed the Lewis citation.) If it were
- family: Inwagen
given: Peter
non-dropping-particle: van
then we'd be good.
It works if you remove the {}
around van Inwagen
and add options={useprefix=true}
(useprefix
is described in the biblatex manual; bibtex itself has no concept of non-dropping particles, I think).
@article{vaninwagen:1975,author = {van Inwagen, Peter},options={useprefix=true},date = {1975},title = {{The incompatibility of Free Will and Determinism}},journal = {{Philosophical Studies}},volume = {27},number = {3},pages = {185--199},doi = {10.1007/bf01624156},kw-level1 = {determinism;},kw-level2 = {free-will;},num-sort = {147057}}
@jgm thanks a lot for the quick feedback!
using
@article{vaninwagen:1975,author = {van Inwagen, Peter},options={useprefix=true},date = {1975},title = {{The incompatibility of Free Will and Determinism}},journal = {{Philosophical Studies}},volume = {27},number = {3},pages = {185--199},doi = {10.1007/bf01624156},kw-level1 = {determinism;},kw-level2 = {free-will;},num-sort = {147057}}
does improve things. Only one detail missing, with a CSL using demote-non-dropping-particle="display-only"
and a macro for contributors
(that gets printed first in the bibliography) that looks like this:
<macro name="contributors">
<group delimiter=". ">
<names variable="author">
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
<name-part name="family" font-variant="small-caps"/>
</name>
<label form="short" prefix=", "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<names variable="director"/>
<text macro="substitute-title"/>
<text macro="title"/>
</substitute>
</names>
<text macro="recipient"/>
</group>
</macro>
in the visual CSL editor we get the sorting of the bibliography correct (van Inwagen under "I"), and it gets printed in the bibliography as "van Inwagen, Peter". However, with your suggestion we get the ordering right, but the name renders as "Inwagen, Peter van". Any clue on this one? I thought all the issues would go away if we could find a way to tell pandoc which one is a non-dropping particle, but apparently there's something more going on.
However, with your suggestion we get the ordering right, but the name renders as "Inwagen, Peter van".
Does this also happen with the CSLJSON bibliography with non-dropping-particle? If so, then it's a citeproc issue and not an issue of bibtex conversion.
However, with your suggestion we get the ordering right, but the name renders as "Inwagen, Peter van".
Does this also happen with the CSLJSON bibliography with non-dropping-particle? If so, then it's a citeproc issue and not an issue of bibtex conversion.
@jgm I just noted that yes, it also happens when using the .json bibliography (ordering correct, but name renders as "Inwagen, Peter van"). It is the exact same csljson uploaded to the visual CSL editor though, and both my local pandoc and the visual editor have the same csl.
@jgm should I open another issue at citeproc?
Yes, let's close this one and open a new one at citeproc, with the CSL JSON bibliography and actual and expected output.
Explanation
When using a
.bib
bibliography file with citeproc, non-dropping particles in family names of authors seem to be treated differently than when using a csljson bibliography.In particular, when using the JSON our CSL applies correctly the config we have set up to print author names and sort, but when using the bib file our CSL doesn't do anything. I noticed this because of the discrepancy I was getting between a visual CSL editor (https://editor.citationstyles.org/visualEditor/), to which I upload a csljson, and my local pdfs compiled with pandoc with the corresponding bib file.
We have double brackets around family names with particles (e.g.,
author = {{van Inwagen}, Peter}
, but removing doesn't help.Minimal example
Original md file,
name-particles.md
:bib file,
name-particles.bib
:if we run
pandoc -C -s -o out.tex name-particles.md
(orpandoc -C -s -o out.pdf name-particles.md
), we get, in the bibliography printed at the end, that van Inwagen appears last.However, if now we do
pandoc --from bibtex --to csljson name-particles.bib
and use the resulting json......as the bibliography for
name-particles.md
and repeatpandoc -C -s -o out.tex name-particles.md
(orpandoc -C -s -o out.pdf name-particles.md
), we get van Inwagen sorted in the bibliography before Lewis (what we want).As we can see, the csljson produced correctly identifies "van" as a non-dropping-particle. This seems to be lost however when using the .bib file.
What is wanted
What we ultimately want is that the bibliography produced in
.tex
and.pdf
files when compiling the original markdown (the one using the.bib
file) shows:[@vaninwagen:1975]
, the text "(van Inwagen 1975)"We haven't been able to crack down how to do this by playing with the CSL configuration for non-dropping-particles and double brackets, when using citeproc.
Running...
from within a Ubuntu 22.04.3 LTS (Jammy Jellyfish) docker container.