I tried using the solution here https://tex.stackexchange.com/a/373581/100078 with XeLaTeX. It always gives the error Undefined control sequence "\DeclareSortingNamekeyScheme".
This is the code i'm trying to compile:
\documentclass{article}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareSortingNamekeyScheme{
\keypart{
\namepart{given}
}
\keypart{
\namepart{prefix}
}
\keypart{
\namepart{family}
}
\keypart{
\namepart{suffix}
}
}
\DeclareNameAlias{sortname}{default}
\begin{document}
\cite{sigfridsson,worman,geer,cicero,nussbaum,knuth:ct:a}
\printbibliography
\end{document}
This seems to be taken straight out of the docs and it still does not work.
I have given up on trying to find the solution to fix this. Any help, please?
P.S. I want to sort the authors by their first name, then last name. I tried another method (in place of default), but even this does not produce the effect.
\DeclareNameAlias{sortname}{first-last}
P.S. Doesn't matter what the references are. Biber compiles (if XeLaTeX produces its .bcf file).
The error log corresponding to the error:
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.cfg
File: biblatex.cfg
)))
! Undefined control sequence.
l.5 \DeclareSortingNamekeyScheme
{
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.
! Undefined control sequence.
l.6 \keypart
{
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.
! Undefined control sequence.
l.7 \namepart
{given}
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.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
\documentclassarticle}to\documentclass{article}. Add before the line\listfiles, compile 3 times and check the log file. At the end you find a list of used packages and version numbers. Please add this list to your question! BTW: With a current MiKTeX I can compile your MWE without errors! – Mensch Oct 18 '17 at 16:06\DeclareSortingNamekeySchemewas introduced in version 3.3 (released 2016-03-01), so probably yourbiblatexversion is too old. The current version is 3.7. When you update to 3.3 or newer read Biblatex 3.3 name formatting. – moewe Oct 19 '17 at 08:44biblatexyou are running? Could you do an update? Did it help? – moewe Oct 22 '17 at 10:45