[Tex/LaTex] configuring bibliography with biblatex

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}}
    \addbibresource{example}

    \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:
enter image description here

any help will be greatly appreciated.

Best Answer

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}{}%
    \addspace\mkbibbold{\bibstring{and}}\space}%
  \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}
\addbibresource{\jobname.bib}

\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}{}%
    \addspace\mkbibbold{\bibstring{and}}\space}%
  \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 enter image description here