5

I would like to sort the names of authors and editors differntly in my citations. Authors should be listed as LastName, FirstName and editors as FirstName LastName.

So far I've tried this, but it hast only changed all names to LastName, FirstName:

\DeclareNameAlias{sortname}{first-last}
\DeclareNameAlias{default}{last-first}
\DeclareNameAlias{editor}{sortname}
  • This depends on the style you use, so we would need to know more about that. Also do you want different formats even if the editor appears instead of the author at the head of an entry? – moewe May 10 '15 at 16:24
  • I have got the following BibLaTeX settings \usepackage[backend=biber,style=verbose-ibid]{biblatex}. If the editor appears instead of the author, the name should show just as the author's would: LastName, FirstName. Basically every and any name before the title should be set as LastName, FirstName. – montauk May 10 '15 at 17:22
  • Ahhh, that was more or less what I expected and makes perfect sense. I*'m slightly confused though because if I have \DeclareNameAlias{sortname}{last-first} with verbose-ibid in the bibliography I get exactly what you want, while in citations the authors are also "first-last". Are you thus asking about citations only? – moewe May 11 '15 at 5:27
  • Yes, sorry about the confusion! I am asking about this behaviour showing in both my bibliography and cites. – montauk May 11 '15 at 13:51
4

Just the line

\DeclareNameAlias{sortname}{last-first}

gives you almost what you want.

biblatex prefers the order "first last" in citations though and will go through quite some length to achieve this (it adds a \DeclareNameAlias{sortname}{default} here and there). To prevent this, go with

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver{}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}

If you also want to keep \fullcites in line, you will need

\DeclareCiteCommand{\fullcite}
  {\usebibmacro{prenote}}
  {\usedriver{}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\footfullcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usedriver{}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

as well.

As a bonus, the following will also make labelnames "last, first"

\DeclareNameFormat{labelname}{%
  \ifcase\value{uniquename}%
    \usebibmacro{name:last}{#1}{#3}{#5}{#7}%
  \or
    \ifuseprefix
      {\usebibmacro{name:last-first}{#1}{#4}{#5}{#8}}
      {\usebibmacro{name:last-first}{#1}{#4}{#6}{#8}}%
  \or
    \usebibmacro{name:last-first}{#1}{#3}{#5}{#7}%
  \fi
  \usebibmacro{name:andothers}}

MWE

\documentclass[english]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=verbose-ibid]{biblatex}
\usepackage{hyperref}
\addbibresource{biblatex-examples.bib}

\DeclareNameAlias{sortname}{last-first}

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver{}
      {\thefield{entrytype}}}%
  \usebibmacro{shorthandintro}}


\DeclareNameFormat{labelname}{%
  \ifcase\value{uniquename}%
    \usebibmacro{name:last}{#1}{#3}{#5}{#7}%
  \or
    \ifuseprefix
      {\usebibmacro{name:last-first}{#1}{#4}{#5}{#8}}
      {\usebibmacro{name:last-first}{#1}{#4}{#6}{#8}}%
  \or
    \usebibmacro{name:last-first}{#1}{#3}{#5}{#7}%
  \fi
  \usebibmacro{name:andothers}}


\begin{document}
\cite{worman,geer,cicero,gaonkar,gaonkar:in,jaffe,baez/article}

\printbibliography
\end{document}

enter image description here

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.