zepinglee / citeproc-lua

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

Problematic spacing in citation #44

Open nickw2066 opened 9 months ago

nickw2066 commented 9 months ago

Describe the bug There are unnecessary newlines in the citation.

Additional information

To Reproduce

% !TEX encoding = UTF-8 Unicode
\documentclass[12pt,oneside]{article}

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

\begin{document}

Asumsi\cite{Hiebert2006-Hermen}

\end{document}

JSON:

[
    {
        "id": "Hiebert2006-Hermen",
        "type": "chapter",
        "author": [
            {
                "family": "Hiebert",
                "given": "Robert J. V."
            }
        ],
        "editor": [
            {
                "family": "Kraus",
                "given": "Wolfgang"
            }
        ],
        "collection-editor": [
            {
                "family": "Peters",
                "given": "Melvin K. H."
            }
        ],
        "title": "The Hermeneutics of Translation in the Septuagint of Genesis",
        "source": "EBSCO",
        "collection-title": "Society of Biblical Literature Septuagint and Cognate Studies",
        "container-title": "Septuagint Research: Issues and Challenges in the Study of the Greek Jewish Scriptures",
        "page": "85-103",
        "publisher-place": "Atlanta",
        "publisher": "Society of Biblical Literature",
        "issued": {
            "date-parts": [
                [
                    "2006"
                ]
            ]
        }
    }
]

Screenshots Output: mwe.pdf

hvoss49 commented 9 months ago

With the style from https://www.zotero.org/styles/turabian-fullnote-bibliography and the current github version it works well with any engine.

zepinglee commented 9 months ago

This bug is actually the same as https://github.com/zepinglee/citeproc-lua/issues/42 and it's fixed in 73d3ad3.

In the provided JSON data, there are several non-breaking spaces (U+00A0) in container-title and collection-title (the highlighted characters below). They are incorrectly converted to new lines in citeproc-lua v0.4.4.

Screenshot 2023-10-04 at 15 39 34