# configuring bibliography with biblatex

so, I am trying to configure the bibliography so that it appears chronologically, (so first citation is (1) in the references), it appears within parentheses () instead of brackets [] and it has the following format: this is an example in which I cite some papers (1) and later on (2),

References

1. Ho, DD, Neumann, AU, Perelson, AS, Chen, W, Leonard, JM, and Markowitz, M. Rapid turnover of plasma virions and CD4 lymphocytes in HIV-1 infection. Nature 373.6510 (1995), pp. 123–126.

so note that the authors are BOLD, last name first, initials without periods, ALL the authors are listed, then comes the YEAR, without parentheses. The article does NOT have " " around it and ideally, the number of the journal is also bold.

So far, I have been able to put the authors bold, last name first, initials without periods, all the authors listed and article without " ". BUT, I cannot find a way to have the year immediately after the authors and the parentheses around the citations. And I have NO idea as of how to put the number of the journal bold...

Here is my code so far:

    \documentclass[12pt]{article}
\usepackage[style=numeric,subentry,sorting=none,firstinits=true,terseinits=true,url=false,doi=false,isbn=false,maxbibnames=99]{biblatex}

%make the names of the authors bold:
\DeclareNameFormat{author}{%
{\ifthenelse{\value{listcount}>7\AND\value{listcount}<\value
{liststop}}
{}
{\ifthenelse{\iffieldequalstr{usere}{unkauth}\OR\iffieldequalstr
{usere}{unkauthdate}}
{\mkbibbrackets{\bfseries{\usebibmacro{name:last-first}{#1}{#4}
{#5}{#7}?}}}
{\bfseries{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}}}}}

%puts first the last name and then the first name
\DeclareNameAlias{default}{last-first}
\renewbibmacro{in:}{}
\AtEveryBibitem{%
\clearlist{language}%
}

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

\begin{document}

this is an example in which I cite some papers \cite{ho1995} and later on                \cite{ahr2004},

\printbibliography
\end{document}


and here is the result:

any help will be greatly appreciated.

Did you have something like this in mind?

You will need xpatch for some macro redefinition shortcuts.

I was not too sure about your \DeclareNameFormat{author}, in particular \ifthenelse{\iffieldequalstr{usere}{unkauth}\OR\iffieldequalstr{usere}{unkauthdate}, so I did not copy that.

The following makes sure that biblatex uses parentheses instead of square brackets.

\DeclareCiteCommand{\cite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibparens{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibparens{#1}}


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


Makes sure that the author names and "and" are printed bold only in the bibliography.

\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}} is for bold volume numbers in articles.

% 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}}


Adds the year after the authors (see the comment regarding punctuation). As of now, the full date is repeated as per usual in numeric; if you want to change that, you could look into what biblatex does in authoryear with \bbx@opt@mergedate@<...>.

The MWE

\documentclass[american, a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{xpatch}
\usepackage[style=numeric,subentry,sorting=none,firstinits=true,terseinits=true,url=false,doi=false,isbn=false,maxbibnames=99]{biblatex}

\DeclareCiteCommand{\cite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibparens{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibparens{#1}}

\AtBeginBibliography{%
\renewcommand*{\finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
\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}}

% 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}}

\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 Ho et\,al. \cite{ho1995}.
\nocite{*}
\printbibliography
\end{document}


produces

• thanks for your reply! everything works perfect except for the fact that I cannot make the package xpatch to work :( I downloaded it in my directory and followed the instructions to get an xpatch.sty but when I try to run your MWE I get the following error: ./xpatch.sty:30: Undefined control sequence. <write> ...cls@pkg \space provides \ExplFileName '\@gobble \on@line . l.30 ...e}{\ExplFileVersion}{\ExplFileDescription} :( :( – Laura Sep 5 '13 at 22:01
• I am on a mac, under Lion 10.7.5, and I have MacTEX-2011. Unfortunately, I have TexLive 2008. I do have my xpatch.sty in the same folder as my document though, so I don't really understand why it doesn't work... – Laura Sep 5 '13 at 22:52
• Well, I updated to MacTex-2013, and now biblatex doesn't work at all :( apparently there is some issue with biblatex and biber, Package biblatex warning: file 'test.bbl' is wrong format version, expected 2.2 – Laura Sep 5 '13 at 23:51
• @Laura -- that new error is no bid deal. Delete all auxiliary files and re-run the sequence latex - biber - latex. (A latex - biber -latex sequence should overwrite the old files anyway, but deleting auxiliary files is a good solution, too, in this case.) If the problem persists, make sure your versions of biblatex and biber` match each other: see their manuals for compatibility details. – jon Sep 6 '13 at 0:00
• well, it just doesn't compile, so I cannot re-run any sequence :( – Laura Sep 6 '13 at 0:37