TransWikia.com

Biblatex: Inconsistent name-format

TeX - LaTeX Asked on August 27, 2020

I use biblatex to manage my references. It works quite well, except for this strange behaviour:

[1] Agresti, A. and Finlay, B. Statistical Methods for the Social Sciences.
    3rd ed. Prentice Hall, 1997.
...

[3] L. Brozovsky and V. Petricek. “Recommender System for Online Dating Service”. In: CoRR
    abs/cs/0703042 (2007).

As you can see, article-references have a different name-format than do book-references. I want to force the following style: surname, first-letter-of-firstname. How can I do it?

The following commands are used to create the bibliography.

usepackage[style=ieee,backend=bibtex]{biblatex}
addbibresource{db.bib} 
printbibliography[heading=bibnumbered]

@book{medianmean,
    author={{Agresti, A. and Finlay, B.}},
    title={Statistical Methods for the Social Sciences},
    publisher={Prentice Hall},
    edition={3},
    year={1997}
}

@article{DBLP:journals/corr/abs-cs-0703042,
    author    = {Brozovsky, L. and Petricek, V.},
    title     = {Recommender System for Online Dating Service},
    journal   = {CoRR},
    volume    = {abs/cs/0703042},
    year      = {2007},
    ee        = {http://arxiv.org/abs/cs/0703042},
    bibsource = {DBLP, http://dblp.uni-trier.de}
}

3 Answers

Change your first entry to remove the extra set of braces in the author:

@book{medianmean,
    author={Agresti, A. and Finlay, B.},
    title={Statistical Methods for the Social Sciences},
    publisher={Prentice Hall},
    edition={3},
    year={1997}
}

By having this extra set of braces, you are telling biblatex that the whole line is effectively one last name, and it prevents things from breaking up semantically the way it is intended.

Remember that whenever you want to tell biblatex (or bibtex) that something should be kept just the way you write it, you can wrap it in another set of braces. This keeps a title like "The creation of the {I}nternet" with the proper capitalization. This "feature" is what you ran into and was causing the issue you observed.

Correct answer by cslstr on August 27, 2020

As you are using the IEEE style the format is {first initials} {last name}. To change the order add (as of biblatex 3.3 [moewe]):

DeclareNameAlias{default}{family-given}

to your preamble.

In versions prior to 3.3 this was:

DeclareNameAlias{default}{first-last}

With the corrections that cslstr pointed out and the addition to your preamble:

documentclass{article}
usepackage[backend=bibtex, style=ieee]{biblatex}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{medianmean,
    author={Agresti, A. and Finlay, B.},
    title={Statistical Methods for the Social Sciences},
    publisher={Prentice Hall},
    edition={3},
    year={1997}
}

@article{DBLP:journals/corr/abs-cs-0703042,
    author    = {Brozovsky, L. and Petricek, V.},
    title     = {Recommender System for Online Dating Service},
    journal   = {CoRR},
    volume    = {abs/cs/0703042},
    year      = {2007},
    ee        = {http://arxiv.org/abs/cs/0703042},
    bibsource = {DBLP, http://dblp.uni-trier.de}
}
end{filecontents}
addbibresource{jobname.bib}
DeclareNameAlias{default}{family-given}

begin{document}
nocite{*}
printbibliography[heading=bibnumbered]
end{document}

will give you: enter image description here

Answered by Alex Grede on August 27, 2020

I tried the same solution posted by Alex Grede, but the order of the names didn't change. I need to use DeclareNameAlias{sortname}{last-first} instead of DeclareNameAlias{default}{last-first}.

Answered by André Novgorodcev on August 27, 2020

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