使用 biblatex-apa 时未定义控制序列

使用 biblatex-apa 时未定义控制序列

我尝试将 ieee-bibtex 更改为 apa-bibtex,但出现了错误。错误似乎与 apa.bbx 中的 apasortcite 有关。这是第一个似乎应该归咎的错误:

! Undefined control sequence.
<argument>  \visibility 
                        {cite} \keypart { \namepart [use=true]{prefix} \name...
l.262 }
       
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

以下我发表我的序言和文件(精简版):

\documentclass[12pt]{report} %fuente a 12pt

\usepackage[
a4paper,
vmargin=2.5cm,
hmargin=3cm
]{geometry}

\usepackage[spanish, es-tabla]{babel} 
\usepackage[babel, spanish=spanish]{csquotes}
\AtBeginEnvironment{quote}{\small}

\usepackage[style=apa, backend=biber, natbib=true, hyperref=true, uniquelist=false, sortcites]{biblatex}
\DeclareLanguageMapping{spanish}{spanish-apa}

\DefineBibliographyStrings{spanish}{%
    andothers = {et\addabbrvspace al\adddot}
}
\DefineBibliographyStrings{spanish}{
    url = {\adddot\space[En línea]\adddot\space Disponible en:}
}
\DefineBibliographyStrings{spanish}{
    urlseen = {Acceso:}
}
\DefineBibliographyStrings{spanish}{
    pages = {pp\adddot},
    page = {p.\adddot}
}

\addbibresource{bibliografia/bibliografia.bib} 


\begin{document}


Hello, this is an example \parencite{bib-ex}.

\addcontentsline{toc}{chapter}{Bibliografía}
\printbibliography

\end{document}

另一方面,.bib 文件如下所示:

@Book{pmr,
  author    = {Francisco García Aznárez and Guillermo López Morante},
  date      = {1997},
  title     = {Situación y perspectivas del transporte público de las personas con movilidad reducida en España},
  location  = {Madrid},
  publisher = {Escuela Libre},
}

生成的文档如下:

引用

sortingnamekeytemplatename=apasortcite

您好,这是一个例子 [sortingnamekeytemplatename=apasortcite](Aznárez & Morante, 1997)。

参考书目

Aznárez, FG 和 Morante, GL (1997)。西班牙境内流动人口公共交通的情况和前景。自由学校。

我已经寻找解决方案,但一无所获。感谢您的帮助。

答案1

您附加的序言不包括\usepackage{hyperref}。同时,hyperref选项已包含在 中\usepackage{biblatex},这返回了一个错误。经过细微调整后,MWE 应如下所示:

\documentclass[12pt]{report} %fuente a 12pt

\usepackage[
a4paper,
vmargin=2.5cm,
hmargin=3cm
]{geometry}
\usepackage{hyperref}
\usepackage[spanish, es-tabla]{babel} 
\usepackage[babel, spanish=spanish]{csquotes}
\AtBeginEnvironment{quote}{\small}

\usepackage[style=apa, backend=biber, natbib=true, uniquelist=false, sortcites]{biblatex}
\DeclareLanguageMapping{spanish}{spanish-apa}

\DefineBibliographyStrings{spanish}{%
    andothers = {et\addabbrvspace al\adddot}
}
\DefineBibliographyStrings{spanish}{
    url = {\adddot\space[En línea]\adddot\space Disponible en:}
}
\DefineBibliographyStrings{spanish}{
    urlseen = {Acceso:}
}
\DefineBibliographyStrings{spanish}{
    pages = {pp\adddot},
    page = {p.\adddot}
}

\addbibresource{mwe.bib} 


\begin{document}

Hello, this is an example \parencite{pmr}.

\addcontentsline{toc}{chapter}{Bibliografía}
\printbibliography

\end{document}

引用的结果如下:

在此处输入图片描述

相关内容