# \DeclareNameAlias not working as expected

I would like to reverse the order of the first and last names, and also use first initials. Here is my MWE:

\documentclass{article}
\usepackage[backend=biber, style=authoryear, firstinits=true]{biblatex}
\begin{filecontents}{refs.bib}
@Article{ref1,
author    = {Nye, Bill and Bean, Mister},
title     = {{Intergalactic car parking}},
journal   = {PLoS Parking},
year      = {2017}
}
\end{filecontents}
\DeclareNameAlias{default}{family-given}
\begin{document}
\nocite{*}
\printbibliography
\end{document}


Which gives:

Why?

There is no name format last-firstinits. You would get the same output if you would use \DeclareNameAlias{sortname}{blub}.

Use the option giveninits along with family-given

\documentclass{article}

\DeclareNameAlias{sortname}{family-given}

\DeclareNameAlias{default}{family-given}

\begin{document}
A\footcite{wilde}
B\footcite{cicero}
\printbibliography
\end{document}


• True. This works. However, my original problem came from a different MWE, which does not follow this behavior. I've updated the question. Sorry for the bad forum form. – Jesse Knight Oct 26 '17 at 16:14
• You are not changing sortname. – Ulrike Fischer Oct 26 '17 at 16:23

I found the solution: authoryear uses sortname for the alias.

Changing:

\DeclareNameAlias{default}{family-given}


to

\DeclareNameAlias{sortname}{family-given}


gives the desired output.