zepinglee / citeproc-lua

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

Undefined control sequence when used with beamer #41

Open nickw2066 opened 10 months ago

nickw2066 commented 10 months ago

Describe the bug "! Undefined control sequence. \l__csl_citation_tl ->\cslcite {McCarthy2007-Deut.}{Carmel McCarthy, ed., \t... l.13 \end{frame}"

Additional information

To Reproduce .tex file:

% !TEX encoding = UTF-8 Unicode
\documentclass[aspectratio=169]{beamer}

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

\begin{document}

\begin{frame}
\frametitle{Test MWE}
Hello\cite{McCarthy2007-Deut.}
\end{frame}

\end{document}

.json file:

[
    {
        "id": "McCarthy2007-Deut.",
        "type": "book",
        "editor": [
            {
                "family": "McCarthy",
                "given": "Carmel"
            }
        ],
        "collection-editor": [
            {
                "family": "Schenker",
                "given": "A."
            }
        ],
        "title": "Deuteronomy",
        "title-short": "Deut.",
        "source": "Accordance",
        "collection-title": "Biblia Hebraica Quinta",
        "collection-number": "5",
        "publisher-place": "Stuttgart",
        "publisher": "Deutsche Bibelgesellshaft",
        "issued": {
            "date-parts": [
                [
                    "2007"
                ]
            ]
        }
    }
]

Here is the output: mwe.pdf

zepinglee commented 10 months ago

Thanks for your feedback and I can reproduce the error. It's basically the compatibility problem with both beamer and hyperref.

nickw2066 commented 10 months ago

Thank you for your answer. Is the error fixable?

zepinglee commented 10 months ago

Fixed in a05611d.

There are still conflicts when csl is used with beamer and backref since all them modify the internal bibliographic commands of LaTeX2e). I'll try to resolve this before releasing to CTAN.

nickw2066 commented 9 months ago

Thank you, I updated to "citation-style-language 2023-09-07 v0.4.3" and the MWE above now works fine. However, if I change the MWE to

% !TEX encoding = UTF-8 Unicode
\documentclass[aspectratio=169]{beamer}

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

\begin{document}

\begin{frame}
\frametitle{Test MWE}
Hello\cite{McCarthy2007-Deut.}
\end{frame}

\begin{frame}
\printbibliography
\end{frame}

\end{document}

(that is, if I add the frame with the \printbibliography command) I get the following error: "! Undefined control sequence.\beamer@bibitem #1->\@bibitem{#1}\ignorespaces \end{frame}". The footnote is still fine, but the bibliography looks like:

Screenshot 2023-09-12 at 7 21 48 pm
zepinglee commented 9 months ago

It turns out to be a typo that has just been fixed in cc77314 . I'll upload to CTAN then.

nickw2066 commented 9 months ago

Thank you!

On 16 Sep 2023, at 8:58 pm, Zeping Lee @.***> wrote:

It turns out to be a typo that has just been fixed in cc77314 https://github.com/zepinglee/citeproc-lua/commit/cc77314aae8e3c5b93bb96ea2fae4432b8cd6c77 . I'll upload to CTAN then.

— Reply to this email directly, view it on GitHub https://github.com/zepinglee/citeproc-lua/issues/41#issuecomment-1722236259, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2MWFLDWTXGEDNXTYRZ5OJLX2WWBLANCNFSM6AAAAAA4GDTVXU. You are receiving this because you authored the thread.