TransWikia.com

How to include numbering for references in bibliography alongwith formatting for last name, first name initial using biblatex?

TeX - LaTeX Asked by silverwolf on July 8, 2021

I am using the following code using biblatex package since I want last name followed by first name initials. However, the bibliography section isn’t listed with numbers. So, I included the defer numbers and resetnumbers=true line in the code. However, I still don’t get the numbered output in my bibliography section. Please help me out.

CODE:

usepackage[%
    style=authortitle,
    citestyle=numeric,
    hyperref=true,
    giveninits=true,
    natbib=true,
    maxbibnames=99,
    uniquename=init,
    dashed=false, % re-print recurring author names in bibliography
    useprefix=true, % for inclusion of 'de' 'da' in surname
    urldate=long,
    sorting=none,
    backend=biber,
    defernumbers=true,  
]{biblatex} %uniquename=false...try


DeclareNameAlias{sortname}{family-given}  
renewcommand*{multinamedelim}{addcommaspace}  
renewcommand*{finalnamedelim}{addcommaspace}  
renewcommand*{nameyeardelim}{addcommaspace}  
setlength{bibitemsep}{baselineskip}  
renewbibmacro{in:}{}  

addbibresource{bibliography.bib}

nocite{*}  
printbibliography[  
  heading=bibintoc,  
  title={Bibliography},  
  resetnumbers=true  
  ]

OUTPUT
enter image description here

In short, I like my bibliography writing style, I just want it to be numbered.
In the usepackage, if I insert bibstyle=numeric, then I get the numbering in the bibliography section but the formatting becomes first name initial followed by last name.

One Answer

If all you want is a numeric bibliography with inverted names, then I suggest you stick to style=numeric and don't load authortitle at all.

You then need to do what authortitle does with sortname manually.

documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}

usepackage[backend=biber,
  style=numeric,
  sorting=none,
  maxbibnames=99,
  giveninits=true,
  useprefix=true,
  defernumbers=true,
  urldate=long,
  natbib=true,]{biblatex}

setlength{bibitemsep}{baselineskip}

DeclareNameAlias{author}{sortname}
DeclareNameAlias{editor}{sortname}
DeclareNameAlias{translator}{sortname}

DeclareNameAlias{sortname}{family-given}

DeclareDelimFormat{multinamedelim}{addcommaspace}
DeclareDelimAlias{finalnamedelim}{multinamedelim}

DeclareDelimFormat{nameyeardelim}{addcommaspace}

renewbibmacro{in:}{}

addbibresource{biblatex-examples.bib}

begin{document}
cite{sigfridsson,worman,geer,cicero}
printbibliography
end{document}

Sigfridsson, E., Ryde, U. ‘Comparison of methods for deriving atomic charges from the electrostatic potential and moments’. Journal of Computational Chemistry 19.4 (1998), pp. 377–395. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.

Answered by moewe on July 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP