semprag / biblatex-sp-unified

An opinionated biblatex implementation of the Unified Stylesheet for Linguistics Journals
LaTeX Project Public License v1.3c
39 stars 12 forks source link

\textcite undefined control sequence when using biblatex-unified without sp.cls #48

Closed jimlaloi closed 4 years ago

jimlaloi commented 4 years ago

When using biblatex-unified with S&P's sp.cls, I'm able to use \textcite no problem. However, when using biblatex-unified without sp.cls, I get an undefined control sequence error.

Minimum working example:

\documentclass{article}
\usepackage[backend=biber,style=unified,maxcitenames=3,maxbibnames=99]{biblatex}

\addbibresource{mwebib.bib}

\begin{filecontents}{mwebib.bib}
    @book{levinEnglishVerbClasses1993,
        ids = {levinEnglishVerbClasses1993},
        title = {English Verb Classes and Alternations : A Preliminary Investigation},
        author = {Levin, Beth},
        date = {1993},
        publisher = {{University of Chicago Press}},
        location = {{Chicago}},
        isbn = {0-226-47532-8}
    }
\end{filecontents}

\begin{document}
    \textcite{levinEnglishVerbClasses1993}

\printbibliography
\end{document}

If I change \documentclass{article} to \documentclass[biblatex]{sp}, then it compiles correctly.

I assume there's something in the sp.cls code that biblatex-unified requires in order to use \textcite but I'm not enough of a wiz to figure out what that might be.

fintelkai commented 4 years ago

@jimlaloi: The problem isn't specific to \textcite. The unified citation style uses hyperlinking between citations and bibliography and thus requires the hyperref package. If you add \usepackage{hyperref} to the preamble of your MWE, it compiles ok. We will either add this requirement to the documentation and/or make it so that unified.cbx enforces the loading of hyperref. Thanks for the report!

jimlaloi commented 4 years ago

That makes sense, thanks!

u-fischer commented 2 years ago

This problem is still open. The style errors without hyperref, but this is neither documented nor enforced somehow.

fintelkai commented 2 years ago

Both the readme and the pdf documentation state explicitly:

The unified citation style relies on hyperlinking between in-text citations and the bibliography. So, the hyperref package is required. It is automatically loaded by sp.cls but if you use a different document class and hyperref is not loaded by that class, you need to add \usepackage{hyperref} to your preamble as well.

@u-fischer: A pull request that improves on that in some way would be welcome.

u-fischer commented 2 years ago

This isn't in the documentation I got in a current texlive, and I also don't see that on ctan http://mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/biblatex-unified/README.md

Did you actually upload the changes?

fintelkai commented 2 years ago

I thought we did but can't find a record of it. I guess we need to do it again.

fintelkai commented 2 years ago

I have now uploaded the new version v1.10, which includes the documentation updates and some other minor improvements.