4

I started using Biber+BiblateX and I wanted to make it produce the citations in the form of a list of the first letter of the authors, similar to the alphabetic style.

Similar is the key word: the alphabetic style add at the end of the letters the last two digits of the year the text was written, but I would like to have just the authors and not the year.

Is there an easy way to do this?

To better understand, I would like to cite a text like

L.Da Vinci and F. Pisano, On the flying fly (1973).

obtaining as an output of cite

[DP]

instead of

[DP73].

Thanks in advance.

1 Answer 1

5

With Biber we have more or less full control of the label for the alphabetic style.

The relevant command is \DeclareLabelalphaTemplate (see §4.5.4 Labels, pp. 163-168 of the biblatex documentation).

For your purposes

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left,ifnames=1]{labelname}
    \field[strwidth=1,strside=left]{labelname}
  }
}

seems to be appropriate: If we have a label or shorthand field, those override any automatic label selection, otherwise we just go with the first three letters of the single author (or truncated first, in case of et al), and the first letter of the last name for any other number of authors.

With

\DeclareFieldFormat{extraalpha}{#1}

you can control the format of the disambiguation that is added if need be.

MWE

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=alphabetic]{biblatex}
\addbibresource{biblatex-examples.bib}

\DeclareFieldFormat{extraalpha}{#1}

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left,ifnames=1]{labelname}
    \field[strwidth=1,strside=left]{labelname}
  }
}

\begin{document}
\cite{worman,geer,baez/article,wilde,knuth:ct:a,knuth:ct:b}

\printbibliography
\end{document}

enter image description here

Note that [Knu1] and [Knu2] have an added "extra label" to help tell them apart.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .