3

I'm looking to remove the comma between author first name and surname in the bibliography. To come out as:

Vincent C, Amalberti R. (2015) LaTeX works so well. BMJ 25(1):370-81

Instead, I'm getting:

Vincent, C, Amalberti, R. (2015) LaTeX works so well. BMJ 25(1),370-81

I've tried \renewcommand*{\revsdnamepunct}{} (as suggested at biblatex: remove commas between last and first names in bibliography) but with no success.

Is my other code clashing somehow? Thanks for any advice.

    \documentclass[11pt,a4paper,twoside,openright]{book}
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage{lmodern}
    \usepackage[english]{babel}
    \usepackage[autostyle]{csquotes}

    \usepackage[backend=biber,style=apa,natbib,
    uniquename=false,
    uniquelist=false,
    firstinits=true,
    terseinits=true,
    dashed=false
    sorting=nyt,
    backref=true,
    hyperref=auto,
    isbn=false,
    url=false,
    eprint=false,
    doi=false]{biblatex}

    % Omit commas in reversed names
    \renewcommand*{\revsdnamepunct}{}

    % All names reversed
    \DeclareNameAlias{default}{last-first}
    \DeclareNameAlias{sortname}{last-first}

    % Remove full stop after year
    \renewcommand{\labelnamepunct}{\addspace}

    % Omit "and" from last author
    \AtBeginBibliography{%
      \renewcommand*{\finalnamedelim}{\addcomma\space}%
    }

    \DeclareLanguageMapping{english}{english-apa}

    % Make article title a hyperlink to the DOI
    \newbibmacro{string+doi}[1]{%
      \iffieldundef{doi}{#1}{\href{http://dx.doi.org/\thefield{doi}}{#1}}}
    \DeclareFieldFormat{title}{\usebibmacro{string+doi}{\mkbibemph{#1}}}
    \DeclareFieldFormat[article]{title}{\usebibmacro{string+doi}{#1}}

    \AtEveryBibitem{%
      \clearname{translator}%
      \clearlist{publisher}%
      \clearfield{pagetotal}%
      \clearfield{note}%
    }

     % no "In: " preceding journal titles
    \renewbibmacro{in:}{%
      \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

     \addbibresource{LaTexbibliography.bib}

    \begin{document}

      This is where I \parencite{Vincent2015}.

     \printbibliography
       \end{document}
2
  • This is really helpful - I've upvoted and accepted, but my votes aren't displayed yet
    – leumsa
    Feb 4, 2016 at 13:38
  • Mhh, interesting, I think because of reputation reasons you cannot yet up-vote the answer, but accepting it should be possible anyway. Maybe try again ...
    – moewe
    Feb 4, 2016 at 17:36

1 Answer 1

1

Compulsory "we are modifying biblatex-apa" warning: The following will probably alter the behaviour of biblatex-apa in a way that the output might not conform to APA style any more. biblatex-apa is specifically designed to follow APA style as closely as possible, so some (supposedly) easy modifications can require more code than expected.

Note first that biblatex-apa has a very special name format and that your two lines

% All names reversed
\DeclareNameAlias{default}{last-first}
\DeclareNameAlias{sortname}{last-first}

do nothing.

The macro in charge of names name:apa:last-first (to be renamed in future versions) does not use \revsdnamepunct, the separators there are hard-coded. You need to go to the source directly and modify the macro there.

With

\renewbibmacro*{name:apa:last-first}[5]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#4#1}%
     \usebibmacro{name:hook}{#4#1}%
     \ifblank{#4}{}{%
       \mkbibnameprefix{#4}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \mkbibnamelast{#1\isdot}%
     \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{#3}\isdot%
                    \ifthenelse{\value{uniquename}>1}
                      {\addspace\mkbibbrackets{#2}}
                      {}}%
     \ifblank{#5}{}{\addcomma\bibnamedelimd\mkbibnameaffix{#5}\isdot}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#2#4}{}{\revsdnamepunct}%
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#3}%
                    \ifthenelse{\value{uniquename}>1}
                      {\addspace\mkbibbrackets{#2}}
                      {}}%
     \ifblank{#4}{}{%
       \addhighpenspace\mkbibnameprefix{#4}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \ifblank{#5}{}{\addcomma\addlowpenspace\mkbibnameaffix{#5}\isdot}}}

you restore the ability to use \revsdnamepunct, so that \renewcommand*{\revsdnamepunct}{} now works as expected.

MWE

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage[autostyle]{csquotes}

\usepackage[backend=biber,style=apa,
  uniquename=false,
  uniquelist=false,
  firstinits=true,
  terseinits=true,]{biblatex}

\DeclareLanguageMapping{english}{english-apa}

\addbibresource{biblatex-examples.bib}

% Omit commas in reversed names
\renewcommand*{\revsdnamepunct}{}

\renewbibmacro*{name:apa:last-first}[5]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#4#1}%
     \usebibmacro{name:hook}{#4#1}%
     \ifblank{#4}{}{%
       \mkbibnameprefix{#4}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \mkbibnamelast{#1\isdot}%
     \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{#3}\isdot%
                    \ifthenelse{\value{uniquename}>1}
                      {\addspace\mkbibbrackets{#2}}
                      {}}%
     \ifblank{#5}{}{\addcomma\bibnamedelimd\mkbibnameaffix{#5}\isdot}}
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#2#4}{}{\revsdnamepunct}%
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#3}%
                    \ifthenelse{\value{uniquename}>1}
                      {\addspace\mkbibbrackets{#2}}
                      {}}%
     \ifblank{#4}{}{%
       \addhighpenspace\mkbibnameprefix{#4}%
       \ifpunctmark{'}{}{\addhighpenspace}}%
     \ifblank{#5}{}{\addcomma\addlowpenspace\mkbibnameaffix{#5}\isdot}}}

\begin{document}
\nocite{sigfridsson,geer,worman}.
\printbibliography
\end{document}

mwe output

1
  • This answer, of course, really only applies to biblatex-apa with the standard styles \revsdnamepunct should work out of the box and with other custom styles there might be other modifications necessary. At first I thought about making a feature request for biblatex-apa to use \revsdnamepunct by default, but I can see that the issue is a bit more delicate.
    – moewe
    Jan 31, 2016 at 8:39

You must log in to answer this question.

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