zepinglee / citeproc-lua

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

Adding "nil" to bibliography entry #63

Closed HiramTheHero closed 1 month ago

HiramTheHero commented 1 month ago

Describe the bug The word "nil" is added to a bibliography entry after "U.S.C" when citing legislation.

Additional information

To Reproduce

\documentclass{article}

\begin{filecontents}[overwrite, noheader]{\jobname.json}
[
    {
        "id": "AmericaCOMPETESAct2010",
        "type": "legislation",
        "abstract": "To invest in innovation through research and development, and to improve the competitiveness of the United States.",
        "chapter-number": "111",
        "container-title": "U.S.C",
        "language": "English (United States)",
        "number": "111-358",
        "section": "525",
        "title": "America Creating Opportunities to Meaningfully Promote Excellence in Technology, Education, and Science Reauthorization Act of 2010",
        "URL": "https://www.govinfo.gov/content/pkg/PLAW-111publ358/html/PLAW-111publ358.htm",
        "volume": "42",
        "author": [
            {
                "literal": "111th Congress"
            }
        ],
        "issued": {
            "date-parts": [
                [
                    "2011"
                ]
            ]
        }
    }
]

\end{filecontents}

\usepackage[style = apa]{citation-style-language}
\addbibresource{\jobname.json}
\usepackage{hyperref}

\begin{document}
\cite{AmericaCOMPETESAct2010}
\printbibliography
\end{document}

Screenshots

Screen Shot 2024-05-24 at 3 58 32 PM
zepinglee commented 1 month ago

This bug is already fixed in latest v0.4.9.

https://github.com/zepinglee/citeproc-lua/blob/e3eb0d52b9bf2d8f4a42a29c0fa03dcacc3151e5/tests/latex/luatex-1/issue-63.tlg#L18

HiramTheHero commented 1 month ago

Thank you for the information. After building the latest version of citeproc-lua and using it, the error went away.