3

Using the following code

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\adddot\nopunct\isdot}

I can remove punctuation from around titles and end the field in a dot. However extending the idea to try to insert a comma between author lists and year has no effect, viz:

\DeclareFieldFormat
  [article,book,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {author}{#1\addcomma\isdot}

I would be grateful for any assistance.

MWE:

\RequirePackage[l2tabu, orthodox]{nag}

\documentclass[a4paper,twoside]{memoir} 
% Unix options
\isopage
\usepackage{xpatch,etex,setspace,excludeonly,ifthen,etoolbox,logreq,makeidx,cals,graphicx}
\usepackage[english]{babel}
\usepackage[style=british]{csquotes}
\usepackage[style=philosophy-classic,firstinits=true,uniquename=init,natbib=true,backend=biber,indexing=true,defernumbers=true]{biblatex}

\DeclareNameAlias{sortname}{last-first} 

\addbibresource{thesis.bib} 

 % Bibliography customisation
\renewcommand*{\newunitpunct}{\addcomma\space}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\adddot\nopunct\isdot}

\DeclareFieldFormat
  [article,book,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {author}{#1\addcomma\isdot}

\renewbibmacro{in:}{%
    \printtext{\bibstring{In}\addcolon\space}%
}

% Remove parentheses from year
\renewbibmacro*{date+extrayear}{%
      \begingroup%
        \clearfield{month}%
        \clearfield{day}%
    \ifboolexpr{%
      test {\iffieldundef{date}}
      and
      test {\iffieldundef{year}}
    }%
      {\iftoggle{bbx:nodate}{\printtext{%
        \midsentence\bibstring{nodate}}}{}}%
      {\printtext{\printdateextra}}%
       \endgroup}%

% Dot after year
\renewcommand{\labelnamepunct}{\adddot\space}

% Put number in parentheses
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
%  \setunit*{\adddot}% DELETED
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\begin{document}
\printbibliography
\end{document}
DGarside
  • 839

1 Answers1

3

The approach cannot work directly. The type of author is not field but is a list of names. The format of author is controlled by \DeclareNameFormat. This directive format each name in the list in turn. Thus it requires a more complex definition, where you use the trick on the last element in the list of names. Here is a simplified definition

\DeclareNameFormat{author}{%
  \ifnumequal{\value{listcount}}{1}
    {\ifnumequal{\value{liststop}}{1}
      {#1\addcomma\addspace #4\addcomma\isdot}
      {#1\addcomma\addspace #4}}
    {\ifnumless{\value{listcount}}{\value{liststop}}
      {\addcomma\addspace #1\addcomma\addspace #4}
      {\addcomma\addspace\bibstring{and} #1\addcomma\addspace #4\addcomma\isdot}%
    }%
}
Guido
  • 30,740
  • Almost but not quite perfect. Can this be tweaked so that the format is Lastname1, Initial(s)., Lastname2, Initial(s)., and Lastname3, Initial(s)., – DGarside Nov 25 '13 at 18:48
  • 2
    Things are easier with newer versions of biblatex (>= 3.5): Biblatex / biber code stopped working. For standard styles \DeclareDelimFormat[biblist,bib]{nameyeardelim}{\addcomma\space} should be enough. Some custom styles need modification for the fancy features, though. – moewe Sep 14 '16 at 12:46