zepinglee / citeproc-lua

A Lua implementation of the Citation Style Language (CSL)
MIT License
62 stars 7 forks source link

Family name affixes #53

Open nickw2066 opened 4 months ago

nickw2066 commented 4 months ago

Describe the bug No support yet for family name affixes (e.g. "van"). According to https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html, if I place "van" (etc.) in the family name it should appear as part of the family name in the references.

Additional information

To Reproduce

\documentclass{article}

\begin{filecontents}[overwrite, noheader]{\jobname.json}
[
    {
        "id": "vanderLouw2007-Transf",
        "type": "book",
        "author": [
            {
                "family": "van der Louw",
                "given": "Theo A. W."
            }
        ],
        "collection-editor": [
            {
                "family": "Baarda",
                "given": "Tj."
            }
        ],
        "title": "Transformations in the Septuagint: Towards an Interaction of Septuagint Studies and Translation Studies",
        "title-short": "Transformations",
        "collection-title": "Contributions to Biblical Exegesis and Theology",
        "collection-number": "47",
        "publisher-place": "Dudley, MA",
        "publisher": "Peeters",
        "issued": {
            "date-parts": [
                [
                    "2007"
                ]
            ]
        }
    }
]

\end{filecontents}

\usepackage{citation-style-language}
\cslsetup{style = turabian-fullnote-bibliography}
\addbibresource{\jobname.json}

\begin{document}

test\cite{vanderLouw2007-Transf}

\printbibliography

\end{document}

Screenshots Screenshot 2024-02-13 at 1 36 02 pm

zepinglee commented 3 months ago

Note this part of description in the given page.

"author": [
     {
             "family": "de las Casas",
             "given": "Bartolomé",
     },
     {
             "family": "King",
             "given": "Rev. Martin Luther Jr., Ph.D.",
     }
]

In the previous example, lowercase elements before the family name are treated as “non-dropping” particles, and lowercase elements following the given name as “dropping” particles. However, these special name parts could also be encoded in discrete properties.

In the CSL style, the demote-non-dropping-particle attribute is set to display-and-sort. According to the CSL spec, the displayed name parts are like [Gogh], [Vincent] [] [van], [III].

https://github.com/zepinglee/citeproc-lua/blob/919b1017d9d99b03bd6307ced6b12876bf30a214/submodules/styles/chicago-fullnote-bibliography.csl#L2

Additionally, the result of citeproc-lua matches Zotero and citeproc-js.

Screenshot 2024-03-10 at 22 03 57