zepinglee / citeproc-lua

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

Cite in csquotes' blockquote not working #21

Closed nickw2066 closed 1 year ago

nickw2066 commented 1 year ago

I'm note sure why this code won't compile:

\documentclass[12pt]{article}

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

\usepackage{csquotes}

\begin{document}

\blockquote{Bruce Metzger said that.\cite{Metzger2005-TheTex}\relax}

\end{document}

Here is my JSON file:

[
    {
        "id": "Metzger2005-TheTex",
        "citation-key": "Metzger2005-TheTex",
        "type": "book",
        "author": [
            {
                "family": "Metzger",
                "given": "Bruce M."
            },
            {
                "family": "Ehrman",
                "given": "Bart D."
            }
        ],
        "title": "The Text of the New Testament: Its Transmission, Corruption, and Restoration",
        "title-short": "Text of the New Testament",
        "edition": "4",
        "publisher-place": "New York, NY",
        "publisher": "Oxford University Press",
        "issued": {
            "date-parts": [
                [
                    "2005"
                ]
            ]
        }
    }
]

The error given is: `! Argument of \csq@getcargs@ii has an extra }.

\par l.11 ... said that.\cite{Metzger2005-TheTex}\relax}` If you spot my error please let me know.
nickw2066 commented 1 year ago

I'm getting another error (on compilation) with itemize and am wondering if it's related? Here is my tex file:

\documentclass[12pt]{article}

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

\begin{document}

\begin{itemize}
\item
Bruce Metzger said that.\cite{Metzger2005-TheTex}
\end{itemize}

\end{document}

The JSON file is the same as above.

The compilation error is:

! Use of \@item doesn't match its definition.
\text@command #1->\edef \reserved@a {
                                     \unexpanded {#1}}\ifx \reserved@a \@emp...

l.11 ... Metzger said that.\cite{Metzger2005-TheTex}
zepinglee commented 1 year ago

Thanks again! I can also reproduce the csquote compatibility error. I may need to dig into the implementation of \blockquote to resolve it.

zepinglee commented 1 year ago
Screen Shot 2022-08-12 at 16 16 18 Screen Shot 2022-08-12 at 16 16 21

It should work as expected now. The itemize issue has also been resolved.