Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
}
share|improve this question
    
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 at 14:04
    
np. I added the two bib entries. –  NaN Apr 3 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 at 14:08
    
ok thx! I fixed this typo, but the name-format is still different. –  NaN Apr 3 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. –  Andrew Swann Apr 3 at 14:22

2 Answers 2

up vote 10 down vote accepted

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.

share|improve this answer
    
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 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 at 22:08

As you are using the IEEE style the format is {first initials} {last name}. To change the order add:

\DeclareNameAlias{default}{last-first}

to your preamble.

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}{last-first}

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

will give you: enter image description here

share|improve this answer
1  
Please also correct the error in medianmean's author format (as pointed out by cslstr) in the other answer. –  moewe Apr 3 at 14:24
    
Fixed, thanks for pointing out my mistake. –  Alex Grede Apr 3 at 14:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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