Code Monkey home page Code Monkey logo

Comments (8)

jgm avatar jgm commented on September 17, 2024

Transferring to pandoc, which handles conversion from bib.

from pandoc.

jgm avatar jgm commented on September 17, 2024

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.

from pandoc.

jgm avatar jgm commented on September 17, 2024

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

from pandoc.

alebg avatar alebg commented on September 17, 2024

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

from pandoc.

jgm avatar jgm commented on September 17, 2024

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.

from pandoc.

alebg avatar alebg commented on September 17, 2024

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.

from pandoc.

alebg avatar alebg commented on September 17, 2024

@jgm should I open another issue at citeproc?

from pandoc.

jgm avatar jgm commented on September 17, 2024

Yes, let's close this one and open a new one at citeproc, with the CSL JSON bibliography and actual and expected output.

from pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.