2

biblatex has an option firstinits which will abbreviate first and middle names in the bibliography. Is there any way to limit this behavior for the editor field only, so that it doesn't abbreviate names in the author field?

In the example below, the author should appear as Lennon, John, but the editors should appear as P. McCartney, J. Lennon, G. Harrison, and R. Starkey.

\documentclass{article}
\usepackage[style = authoryear-comp, maxnames = 99]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{lennon1965,
    AUTHOR = "John Lennon",
    BOOKTITLE = "A book with articles",
    EDITOR = "Paul McCartney and John Lennon and George Harrison and Richard Starkey",
    TITLE = "This is my article in this book",
    YEAR = "1965",
    LOCATION = "Liverpool",
    PAGES = "65--87",
    PUBLISHER = "Cavern Club"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
5

The name format used there is byeditor, so just go with

\DeclareNameAlias{byeditor}{first-last-inits}

\DeclareNameFormat{first-last-inits}{%
  \usebibmacro{name:first-last}{#1}{#4}{#5}{#7}%
  \usebibmacro{name:andothers}}

MWE

\documentclass{article}
\usepackage[style = authoryear-comp, maxnames = 99]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{lennon1965,
    AUTHOR = "John Lennon",
    BOOKTITLE = "A book with articles",
    EDITOR = "Paul McCartney and John Lennon and George Harrison and Richard Starkey",
    TITLE = "This is my article in this book",
    YEAR = "1965",
    LOCATION = "Liverpool",
    PAGES = "65--87",
    PUBLISHER = "Cavern Club"}
\end{filecontents}
\addbibresource{\jobname.bib}

\DeclareNameAlias{byeditor}{first-last-inits}

\DeclareNameFormat{first-last-inits}{%
  \usebibmacro{name:first-last}{#1}{#4}{#5}{#7}%
  \usebibmacro{name:andothers}}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

  • What I feared would happen did happen: This doesn't work together with your solution to tex.stackexchange.com/questions/173638/…. If put together, no abbreviations occur. – Sverre Apr 27 '14 at 13:36
  • 1
    @Sverre It does: I have \DeclareNameAlias{editorin}{first-last} there, change that line to \DeclareNameAlias{editorin}{first-last-inits}. – moewe Apr 27 '14 at 13:39

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.