[Tex/LaTex] Biblatex citation style ASM

biblatex

Bbased on the code in configuring bibliography with biblatex and BibTeX style for the American Society for Microbiology (ASM) – chronological order, authors bold
I am trying to configure the bibliography so that looks like the ASM exsample:

  1. Caserta E, Haemig HAH, Manias DA, Tomsic J, Grundy FJ, Henkin TM, Dunny GM. 2012. In vivo and in vitro analyses of regulation of the pheromone-responsive prgQ promoter by the PrgX pheromone receptor protein. J. Bacteriol. 194:3386-3394.

So far I was able to get the following code:

\documentclass[american, 12pt]{article}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{xpatch}
\usepackage[style=numeric,subentry,sorting=none,backend=bibtex,firstinits=true,terseinits=true,url=false,doi=false,isbn=false,maxbibnames=99]{biblatex}
\addbibresource{\jobname.bib}

\AtBeginBibliography{%
   \renewcommand*{\finalnamedelim}{%
   \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
   \addspace\mkbibbold{\bibstring{}}}%
   \renewcommand*{\mkbibnamelast}[1]{\mkbibbold{#1}}%
   \renewcommand*{\mkbibnamefirst}[1]{\mkbibbold{#1}}%
   }

 \DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}

 \DeclareNameAlias{default}{last-first}

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

  \renewbibmacro{in:}{}

 % remove the \addot if you don't want a dot before the year.
 \xapptobibmacro{author}{\adddot\addspace\printfield{year}}{\typeout{successfully patched bibmacro{author} to include year}}{\typeout{failed to patch bibmacro{author} to include year}}
 \xapptobibmacro{editor}{\adddot\addspace\printfield{year}}{\typeout{successfully patched bibmacro{editor} to include year}}{\typeout{failed to patch bibmacro{editor} to include year}}

 \DeclareFieldFormat{date}{\scriptsize{#1}}
 \DeclareFieldFormat{pages}{#1}

\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}

\begin{filecontents}{\jobname.bib}
@article{ho1995,
author        = {David D. Ho and Avidan U. Neumann and Alan S. Perelson and Wen Chen   and John M. Leonard and Martin Markowitz},
title         = {Rapid turnover of plasma virions and CD4 lymphocytes in HIV-1 infection},
journal       = {Nature},
volume        = {373},
number        = {6510},
page          = {123-126},
date          = {1995},
}
@article{testartlong,
  author        = {Arnold Uthor and William Riter and Rita Esearcher and Steven C. Ientist and Stuart T. Udent and Peter R. Ofessor and Lewis E. C. Turer},
title         = {An Article about Articles},
journal       = {Journal of Articles},
volume        = {8},
number        = {2},
page          = {1-5},
date          = {2010},
 }
@article{testart,
  author        = {Arnold Uthor and William Riter},
  title         = {A Very Interesting Article},
  journal       = {Journal of Articles},
  volume        = {7},
  number        = {3},
  page          = {1-5},
  date          = {2010},
}
@book{testbook,
  author        = {Walter Ordsmith},
  editor        = {Eddie Ditor},
  title         = {The Work},
  subtitle      = {Subtitle},
  date          = {1983},
}
@online{testonline,
  author        = {Bernie Logger},
  title         = {A Very Opinionated Blog Post},
  url           = {http://example.com},
  year          = {2013},
}
\end{filecontents}

\begin{document}
  Let's cite \cite{ho1995}.
  \printbibliography
\end{document}

How can I remove the bracket [1] to get 1. on the number in the biblography and how to suppress the date at the end of the reference after the pages?
Thank you for your suggestions.

Best Answer

I can partially answer: adding this line to your preamble will suppress the brackets and add a dot:

\DeclareFieldFormat{labelnumberwidth}{#1\adddot}

As for having the date after the author name, it's a bit more complicated (at least for me — maybe someone can give a better solution). It consists in firstly looking at the different \DeclareBibliographyDriver commands in standard.bbx and suppressing the macros that are in charge of the date, replacing them if necessary.
I give a couple of examples: for the book class, there is a

  \usebibmacro{publisher+location+date}  

which you have to replace by

  \usebibmacro{publisher+location}  

The latter is not defined by biblatex. So you have to define a \newbibmacro*{publisher+location} that will have the same ingredients as the former, except that you'll delete the last but one command, \usebibmacro{date}. That will settle the case of book, collection, inbook, incollection and manual.

Similar other bibmacros will have to be replaced in the same way : location+date (booklet, unpublished); event+venue+date ((in)proceedings); organization+location+date (misc); institution+location+date (report, thesis). For patent (?) and online, just suppress \usebibmacro{date}.

The case of article is a little different: the responsible for printing the date is the journal+issuetitle macro; towards the end of the macro definition, you'll have to replace a \usebibmacro{issue+date} by \usebibmacro{issue}.

Secondly, the bibliography drivers, just after the lines mentioning the author/translator, there is this line:

\setunit{\labelnamepunct}\newblock

Insert just above it these 2 lines:

\newunit 
\usebibmacro{date} 

That's all. I hope I've been clear. Let me add that you don't need to use xpatch for this solution.

Result:enter image description here

Added on 01/30: here is the code I used to redefine the journal+issue macro:

\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addspace}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\usebibmacro{issue}%+date
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit}