# Biblatex 3.3 name formatting, just year shown

I tryed to adapt my bibmacros to the new version of Biblatex but now when I use them, just the year is shown in my citation.

My bibmacro looks like this:

\newbibmacro{name:normalfall}{% Normalfall: 1,4,5,8
\textbf{\namepartfamily}  % #1->\namepartfamily, #2->\namepartfamilyi
\textbf{\namepartgiveni}   % #3->\namepartgiven,  #4->\namepartgiveni
\namepartprefix % #5->\namepartprefix, #6->\namepartprefixi
\namepartsuffixi % #7->\namepartsuffix, #8->\namepartsuffixi
}

And I use it with:

\DeclareNameFormat{sortname}{% Bibliographie
\nameparts{#1}
\ifnum\value{uniquename}=0 % Normalfall
\ifuseprefix
{\usebibmacro{name:normalfall}}
{\usebibmacro{name:normalfall2}}%
\fi

On the pages under the text, just the year and not the authors are written.

It should look like this:

But it looks like this:

I hope I wrote understandable what my problem is.

Edit:

I am using a prepared test file of my university where everything worked but the citing.

Example for the .bib-file:

@Book{Test,
Title                    = {TestTitle},
Author                   = {Testauthor, N.},
Year                     = {2007},
Publisher                = {TestPublisher},

Owner                    = {Testowner},
Timestamp                = {2015.01.04}
}

I want to use it in the text with:

\documentclass[]{article}

\usepackage[                % Biblatex
backend=biber,
bibstyle=_dhbw_authoryear,
citestyle=authoryear,
uniquename=true, useprefix=true,
bibencoding=utf8]{biblatex}

\input{includes/_dhbw_biblatex-config.tex}

\bibliography{includes/literatur-datenbank.bib}

\begin{document}

Testauthor\footcite{Test} here is more text.

\end{document}

The _dhbw_biblatex-config.tex consists of the newbibmacro and the DeclareNameFormat that is written at the beginning of my question.

Edit: I don't know if I should delete the old part, I will now try to give all needed information.

My MWE is:

\documentclass[]{article}

\usepackage[                % Biblatex
backend=biber,
bibstyle=authoryear,
citestyle=authoryear,
uniquename=true, useprefix=true,
bibencoding=utf8]{biblatex}

\input{includes/_dhbw_biblatex-config.tex}

\bibliography{includes/literatur-datenbank.bib}

\begin{document}

Testauthor\footcite{Test} here is more text.

\end{document}

The included literature database (literatur-datenbank.bib) is:

@Book{Test,
Title                    = {TestTitle},
Author                   = {Testauthor, N.},
Year                     = {2007},
Publisher                = {TestPublisher},

Owner                    = {Testowner},
Timestamp                = {2015.01.04}
}

And the _dhbw_biblatex-config.tex is:

\newbibmacro{name:normalfallZ}{% complete first name: 1, ,5,8
\textbf{\namepartfamily}  % #1->\namepartfamily, #2->\namepartfamilyi
\textbf{}   % #3->\namepartgiven,  #4->\namepartgiveni
\namepartprefix % #5->\namepartprefix, #6->\namepartprefixi
\namepartsuffixi % #7->\namepartsuffix, #8->\namepartsuffixi
}

%Order of authors
%
% http://golatex.de/viewtopic,p,80448.html#80448
% Argumente: siehe http://texwelt.de/blog/modifizieren-eines-biblatex-stils/

\DeclareNameFormat{labelname}{%
\ifnum\value{uniquename}=0 %
\ifuseprefix
{\usebibmacro{name:normalfallZ}}

\fi

}

How I said, just the year is shown on the bottom of my PDF, not the author.

• Your problem would be easier to understand (for me at least) if you could give a full MWE that we can compile and play around with. Do you use Biber? How do the macros you show us there work/how are they called? – moewe May 31 '16 at 8:23
• Maybe what you want can also be achieved without poking around in the innards of the name macros. What do you want to get? – moewe May 31 '16 at 8:24
• How would the DeclareNameFormat come into play? As far as I can see, this has effect on just the bibliography, not citations -- right? The citestyle is a standard style, and I don't have the bibstyle (is it a customized one?). So I used option style=authoryear -- but of course that prints "Testauthor 2007." as footnote. A working MWE (possibly with a link to the non-standard style files) would be appreciated. :-) – Andreas May 31 '16 at 12:22
• With your MWE I can't reproduce the problem you show us in the screenshots (I had to replace _dhbw_authoryear by authoryear and \input{includes/_dhbw_biblatex-config.tex} by the snippets you gave above), the problem does not come from what you have shown us so far. Please create an MWE that we can run on our machines out of the box that also reproduces the problem. – moewe May 31 '16 at 17:20
• All I can say at this point is that while name:normalfall looks a bit fishy, it seems to work just fine. Note that the code you have shown us so far would normally only affect the bibliography and not the citations (of course I can't be sure about your custom style, but normally default would not apply to citations). – moewe May 31 '16 at 17:23

The definition of the name format misses the call to \nameparts{#1}. This command populates the various parts of the name (for each parts, it generates two value, the full and the initial one).

Thus the \DeclareNameFormat definition should be changed as follows

\DeclareNameFormat{labelname}{%
\ifnum\value{uniquename}=0 %
\ifuseprefix
{\usebibmacro{name:normalfallZ}}
\fi
}

By the ways the use of the various conditionals is unclear, thus the definition can simply be:

\DeclareNameFormat{labelname}{%
\nameparts{#1}%
\usebibmacro{name:normalfallZ}%
}
• In biblatex >= 3.4 \nameparts is a no-op and thus unnecessary, but in 3.3 it is indeed needed. Indeed the logic doesn't seem to be thought trough at all. Note that in biblatex.def the name: macros take the name parts as arguments and don't call \nampart... themselves (but that is probably more a matter of taste than anything). – moewe Jun 4 '16 at 12:29
• Thank you so much! :) It works. The only problem is, that there is now a lot of whitespace. Could you imagine why? – Futureflo Jun 5 '16 at 8:50
• The spaces come from the spaces between the name parts commands and %. In your definition you add a space after the family name, a space after the empty bold and so on. – Guido Jun 5 '16 at 9:47