1

I tried to change my ieee-bibtex to apa-bibtex and errors appeared. The error seems to refer to the apasortcite in the apa.bbx. This is the first error that seems to be the guilty:

! 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'), typeI' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

Here I present my preamble and document (reduced):

\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}

In the other hand, the .bib file looks like this:

@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},
}

An the resulting document is this:

cite

sortingnamekeytemplatename=apasortcite

Hello, this is an example [sortingnamekeytemplatename=apasortcite](Aznárez & Morante, 1997).

BIBLIOGRAFÍA

Aznárez, F. G., & Morante, G. L. (1997). Situación y perspectivas del transporte público de las personas con movilidad reducida en España. Escuela Libre.

I have look for solutions but i got anything. Thank for your helps.

franarx
  • 31
  • Your sample document compiles with no error after I remove the doxygen package (which I don't have). In order for us to help you, you will need to (i) trim the sample by removing all packages and code except for babel, csquotes, and the biblatex code. (ii) Show us a .bib file item that causes the error. Without a reproducible error, it will be hard to test. Did you make sure you removed all the auxiliary files after you switched to biblatex-apa? – Alan Munn Sep 12 '22 at 21:30
  • you are showing a "summary" of the errors from your editor which has no useful information, The tex error will show which file the error is in, and which command is undefined. Show the full error from the log file, in a code block so line breaks are preserved. – David Carlisle Sep 12 '22 at 23:00
  • I've already deleted the auxiliary files and the result was the same. On the other hand, I edited the issue in order to show the log error, a .bib file and a I reduced the tex document to the essential. – franarx Sep 13 '22 at 18:41
  • Nevermind, my local compiler needed a manual update... – franarx Sep 14 '22 at 18:12
  • Yes, updating everything in MikTeX and restarting computer did the trick for me – Samuel Saari Feb 23 '23 at 08:27

1 Answers1

0

The preamble you’ve attached does not include \usepackage{hyperref}. Meanwhile, the hyperref option has been included within \usepackage{biblatex}, which returned an error. After minor tweaking, the MWE should look like this:

\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}

And the result of citation would be the following:

enter image description here

  • Hello, thanks for the answer. The hyperref package was already in my document and the error still appears. I have tried with a new file with the document you've posted and I recieve the same error. Can it be something about my compiler? – franarx Sep 14 '22 at 16:59
  • Nevermind, my local compiler needed a manual update... – franarx Sep 14 '22 at 18:12
  • Passing hyperref=true, to biblatex will not cause an error if hyperref is not loaded. There will just be a warning. For the most part the difference between hyperref=true, and the default hyperref=auto, is negligible, so that I think that hyperref=true, is pretty much pointless. The error about \visibility is most likely caused by combinig a new biblatex-apa with an old biblatex and can be fixed by properly updating the entire TeX system (as confirmed by the OP in the comments). – moewe Sep 17 '22 at 06:37