9

I have several sources in my reference list that I need to abbreviate for citing them (e.g. (IEA 2005)). I do this with biblatex and {shortauthor}, which works great. Still, how can I show the abbreviation also in the reference list, making it look something like:

IEA (2005): International Energy Agency. World Energy Outlook 2005....

or maybe even better:

IEA - International Energy Agency (2005): World Energy Outlook 2005....

instead of:

International Energy Agency (2005). World Energy Outlook 2005....

lockstep
  • 250,273
Ben
  • 91
  • 1
  • 2

2 Answers2

14

You could redefine the bibmacro begentry:

\documentclass[ngerman]{scrartcl}
\listfiles
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{iea,
author = {{International Energy Agency}},
title = {World Energy Outlook},
shortauthor = {IEA},
date = {2005}
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel,csquotes}

\usepackage[
    style=authoryear,
  backend=biber
]{biblatex}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\renewbibmacro*{begentry}{%
    \ifnameundef{shortauthor}
        {}
        {\printnames{shortauthor}%
         \addspace\textendash\space}}
\begin{document}
\cite{companion,iea}

\printbibliography
\end{document}

enter image description here

domwass
  • 11,563
  • Sir, this does not only work perfectly well, you were also incredibly fast! Thank you very, very much! – Ben Mar 09 '12 at 14:21
  • 5
    Might want to change the sorting scheme as well. The same problem but with shorthand was covered in a previous question. – Audrey Mar 09 '12 at 14:29
  • 1
    @Ben, if this solves your problem, please consider to accept my answer (this is not the same as upvoting). – domwass Mar 09 '12 at 14:35
  • @domwass I have used your solution together with http://tex.stackexchange.com/q/17905/4483 Now I have a follow-up question: how can I make the shortauthor being replaced by a dash, when multiple entries occur? – Paul Feb 19 '14 at 18:35
1
\renewbibmacro*{begentry}{%
    \ifnameundef{shortauthor}
         {}
         {\printnames{shortauthor}%
         \addspace\textendash\space}}

Thank you, this helped me a lot.

I share with you my solution for author/shortauthor in combination with editor/shorteditor:

\renewbibmacro*{begentry}{%
    \ifnameundef{shortauthor}
        {\ifnameundef{shorteditor}
            {}
            {\printnames{shorteditor}%
             \addspace\textendash\space}}
         {\printnames{shortauthor}%
          \addspace\textendash\space}}
Raphael
  • 11