# biblatex prints “family=, familyi=” etc. in bibliography

My aim is to use BiBLaTeX with the numeric-comp style and family-given/given-family way of sorting author's names, with all names in bold. Here's my MWE:

\documentclass{scrreprt}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage[
backend=biber,
style=numeric-comp,
sorting=none,
]{biblatex}

\DeclareNameAlias{sortname}{family-given/given-family-bold}
\DeclareNameFormat{family-given/given-family-bold}{\mkbibbold{%
\ifnumequal{\value{listcount}}{1}
{\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\ifboolexpe{%
test {\ifdefvoid\namepartgiven}
and
test {\ifdefvoid\namepartprefix}}
{}
{\usebibmacro{name:revsdelim}}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}}

\DeclareNameAlias{sortname}{given-family-bold}

\DeclareNameAlias{author}{given-family-bold}
\DeclareNameAlias{editor}{given-family-bold}
\DeclareNameAlias{translator}{given-family-bold}

\usepackage{filecontents}

\begin{filecontents}{test.bib}
@book{Doe86,
author = {Doe, John},
year = {1986},
title = {some book},
}
\end{filecontents}

\begin{document}

I'm citing \cite{Doe86}

\printbibliography

\end{document}


Strangely, it produces the following ouput, no matter how often I compile (both latex and biber). What am I doing wrong?

• @moewe, thanks, it looks normal again and is so much better for its shortness! It's weird that the other one doesn't work because I copy-pasted the code from one of your answers. Could it be a version issue? However, now the 'family-given/given-family' sorting is not maintained, how do I go about that? – Anne Morbach Aug 17 at 16:14

With a current version of biblatex I would use name wrappers to apply the boldface to the names. If you want the mixed family-given/given-family order, you still need to redefine the name format as well (because the default for numeric styles is given-family order).

\documentclass{scrreprt}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage[
backend=biber,
style=numeric-comp,
sorting=none,
]{biblatex}

\DeclareNameAlias{sortname}{family-given/given-family}

\DeclareNameAlias{author}{sortname}
\DeclareNameAlias{editor}{sortname}
\DeclareNameAlias{translator}{sortname}

\DeclareNameWrapperFormat{sortname}{\mkbibbold{#1}}

\DeclareNameWrapperAlias{author}{sortname}
\DeclareNameWrapperAlias{editor}{sortname}
\DeclareNameWrapperAlias{translator}{sortname}

\begin{document}
I'm citing \cite{sigfridsson,nussbaum}

\printbibliography
\end{document}


The problem with the code from the question was that it defined one name format (family-given/given-family-bold), but then used a different, non-existing format (given-family-bold). Non-existing formats result in the weird output you got. The could could be reworked as follows (but I still prefer the solution above).

\documentclass{scrreprt}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage[
backend=biber,
style=numeric-comp,
sorting=none,
]{biblatex}

\DeclareNameFormat{family-given/given-family-bold}{%
\mkbibbold{%
\ifnumequal{\value{listcount}}{1}
{\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\ifboolexpe{%
test {\ifdefvoid\namepartgiven}
and
test {\ifdefvoid\namepartprefix}}
{}
{\usebibmacro{name:revsdelim}}}
{\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}}%
\usebibmacro{name:andothers}}}

\DeclareNameAlias{sortname}{family-given/given-family-bold}

\DeclareNameAlias{author}{sortname}
\DeclareNameAlias{editor}{sortname}
\DeclareNameAlias{translator}{sortname}