5

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}
}
5
  • Can you post what you have in the .bib file for these two entries? There might be something there that will help to diagnose the problem. Generally, it is good to post a full MWE that recreates the problem.
    – cslstr
    Apr 3 '14 at 14:04
  • np. I added the two bib entries.
    – NaN
    Apr 3 '14 at 14:08
  • 2
    The author in medianmean is faulty: It should be author = {Agresti, A. and Finlay, B.}, (note: no comma after A. and no double curly braces).
    – moewe
    Apr 3 '14 at 14:08
  • ok thx! I fixed this typo, but the name-format is still different.
    – NaN
    Apr 3 '14 at 14:12
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. You can edit your question with your update. Also it is best to complete it to a minimal working example (MWE) that we can test. As it stands making the change mentioned above fixes the problem in a standard document. Apr 3 '14 at 14:22
12

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.

2
  • Correct me if I'm wrong, but I believe you should use {Internet} to preserve capitalization instead of {I}nternet since the last one might produce bogus spacing between the I and n.
    – Bakuriu
    Apr 3 '14 at 21:37
  • So, in principle, you are correct. Although enclosing just one letter is how the BibTeX documentation suggests to do things, it will interrupt proper kerning between the letters. But it also depends on what you want to achieve. Some styles will convert to all uppercase, which enclosing the whole word will interfere with. See similar discussion here: tex.stackexchange.com/a/140071/47522
    – cslstr
    Apr 3 '14 at 22:08
3

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

2
  • 1
    Please also correct the error in medianmean's author format (as pointed out by cslstr) in the other answer.
    – moewe
    Apr 3 '14 at 14:24
  • 2
    The name formatting code was overhauled in biblatex v3.3 (see e.g. tex.stackexchange.com/q/299036/35864), last-first is now family-given, so \DeclareNameAlias{default}{last-first} would be \DeclareNameAlias{default}{family-given}. The old name will continue to work, but will throw a warning.
    – moewe
    Jul 27 '20 at 19:07
0

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

1
  • That depends on the style you use. authortitle- and authoryear-based bibliography styles (this includes the verbose standard styles) will need to modify sortname to change the format of the 'primary name' (usually the author or editor). Some other styles (most notably numeric and numeric derivatives like ieee, which is used in the MWE) use only default. Note that default applies to more names than just the primary name. (This may become interesting when you have a @book written by an author and translated by a different translator).
    – moewe
    Jul 27 '20 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.