9

I am using biblatex to format my references and I want to format them according to

<LastName> <FirstNameInitial>, <LastName> <FirstNameInitial>

and so on. In order to remove the standard dot/fullstop after the initial I have tried to use Modify the last-name first-name separator in biblatex's authortitle

The problem here is that it only formats the first author after the desired standard. A minimum working example (copied from the above question) is given below. I am almost sure that it is some small part of the answer given in the linked question that needs to be changed, but my biblatex coding skills are at a minium. A picture of the output code is shown in the above linked question but I can not post it here.

\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}
\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}
1

1 Answer 1

10

As pointed out by Audrey in a comment, one should amend the solution linked in the OP's comment with setting terseinits=true and tinkering with \DeclareNameAlias for the name sorting order.

\documentclass{article}

\usepackage[style=authortitle,firstinits=true,terseinits=true]{biblatex}

\makeatletter
\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}\isdot}%
       \ifpunctmark{'}{}{\bibnamedelimc}}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%      \ifblank{#2}{}{\addcomma\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% DELETED
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% NEW
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%      \ifblank{#2#3}{}{\addcomma}% DELETED
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
     \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
\makeatother

\DeclareNameAlias{sortname}{last-first}

\usepackage{filecontents}

\begin{filecontents}{\jobname.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}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here

5
  • 1
    I think the OP also wants all authors to be listed as Surname, FirstInit, not just the first one.
    – Mico
    Aug 1, 2012 at 11:07
  • @Mico: Indeed. MWE updated.
    – lockstep
    Aug 1, 2012 at 11:29
  • Thanks for the answer it has pointed me in the correct directions but two things: 1) If I copy paste your example I still see the . after the initial. I am unsure of the reason but think it is some strange setting on my computer, will investigate. 2) I would also like to remove the extra comma after the surname of the author: tex.stackexchange.com/questions/17583/…
    – schr
    Aug 1, 2012 at 11:55
  • @schr I updated my answer.
    – lockstep
    Aug 1, 2012 at 12:09
  • 3
    @lockstep Redefining \bibinitperiod only works for biber and won't suppress dots in hyphenated first names. Enabling terseinits as in your duplicate(?) solution is preferable. Suppressing commas should be easier with a dedicated punctuation command added to 2.1.
    – Audrey
    Aug 1, 2012 at 19:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .