[Tex/LaTex] biblatex: the last-name first-name separator authortitle

biblatexpunctuation

In the answer to the post Modify the last-name first-name separator in biblatex's authortitle it was shown how to customize formattting author's name.

I need a somewhat different formatting, namely "Fox P., R. Rabbit" instead of "Fox P, R. Rabbit" (with the dot before comma as required by national standards of my country). How to modifiy the following script borrowed from the above cited post in order to add a dot after "Fox P" before "," and to keep it working with any number of authors? I meean that "Fox P." sould not transform to "Fox P.." in case of single author.

\RequirePackage{filecontents}
\begin{filecontents}{sample.bib}
@ARTICLE{liu:11,
  author = {Peter Fox and Richard Rabbit and Franc Bird},
  title = {Animals are the better humans},
  journal = {Horse and Hound},
  year = {2011},
  volume = {10},
  pages = {11--15}
}
\end{filecontents}

\documentclass[a4paper,ngerman]{scrartcl}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[style=authortitle,firstinits=true]{biblatex}
% =================================
% biblatex modification
\makeatletter
\def\MKbibnamefirst#1{\expandafter\mkbibnamefirst@i#1..\@nil}
\def\mkbibnamefirst@i#1.#2.#3\@nil{#1}
\renewbibmacro*{name:last-first}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \ifblank{#3}{}{%
       \ifcapital
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
     {\mkbibnameprefix{#3}}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\addlowpenspace\mkbibnameaffix{#4}\isdot}%
     \ifblank{#2}{}{\addlowpenspace\mkbibnamefirst{#2}}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\addlowpenspace\mkbibnameaffix{#4}\isdot}%
%     \ifblank{#2#3}{}{\addcomma}%
     \ifblank{#2}{}{\addlowpenspace\MKbibnamefirst{#2}}%
%     \ifblank{#3}{}{\addlowpenspace\mkbibnameprefix{#3}\isdot}
}}
\makeatother
% =================================

\bibliography{sample}
\begin{document}
   Samplecite~\cite{liu:11}.
   \printbibliography
\end{document}

Best Answer

The solution is to delete all of the extra code in the example in the question you refer to.

\RequirePackage{filecontents}
\begin{filecontents}{sample.bib}
@ARTICLE{liu:11,
  author = {Peter Fox and Richard Rabbit and Franc Bird},
  title = {Animals are the better humans},
  journal = {Horse and Hound},
  year = {2011},
  volume = {10},
  pages = {11--15}
}
\end{filecontents}

\documentclass[a4paper,ngerman]{scrartcl}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[style=authortitle,firstinits=true]{biblatex}

\bibliography{sample,newmainjournals}
\begin{document}
   Samplecite~\cite{liu:11}.
   \printbibliography
\end{document}

result of code