1

I am trying to use alpha bibliography style, but I have to customise it. what I have in my .bib file is :

@book{laue,
    Author = {Kurt Laue and Helmut Stenger},
    Date-Added = {2014-05-06 20:55:13 +0000},
    Date-Modified = {2014-05-06 20:55:42 +0000},
    Title = {Strangpressen: Verfahren, Maschinen, Werkzeuge},
    Year = {1976}}

and naturally I get:

enter image description here

But instead of this I would like to have the bibliography and citations appear like [LAU76] instead of [LS76]. I mean, I would like to appear all of my citations first 3 letters(capital) of the first author and the year of the publication.

How do I do that? Thanks...

  • So to be clear: You always want to have only the first three letters of the first author's last name regardless of the total number of authors? – moewe May 8 '14 at 17:42
  • Precisely, and the last 2 digits of the year. Sounds a bit weird I know.. – alp May 8 '14 at 18:13
3

You can redefine the the way the label is created by Biber with \DeclareLabelalphaTemplate.

\renewcommand*{\labelalphaothers}{}

This is to get rid of the + if there are more authors than maxnames.

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left]{labelname}
  }
  \labelelement{
    \field[strwidth=2,strside=right]{year}    
  }
}

This always takes the first three names of the last name of the first author and adds the last two digits of the year.

We also set maxalphanames=1 and minalphanames=1

\usepackage[maxalphanames=1, minalphanames=1, style=alphabetic, backend=biber]{biblatex}

MWE

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{laue,
    Author = {Kurt Laue and Helmut Stenger},
    Date-Added = {2014-05-06 20:55:13 +0000},
    Date-Modified = {2014-05-06 20:55:42 +0000},
    Title = {Strangpressen: Verfahren, Maschinen, Werkzeuge},
    Year = {1976}}
\end{filecontents*}
\usepackage[maxalphanames=1, minalphanames=1, style=alphabetic, backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\addbibresource{\jobname.bib}

\renewcommand*{\labelalphaothers}{}

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left]{labelname}
  }
  \labelelement{
    \field[strwidth=2,strside=right]{year}    
  }
}

\begin{document}
  \cite{laue,wilde,baez/article,cicero}
  \printbibliography
\end{document}

enter image description here

  • Hello again, this solution worked like magic, thank you very much. But I came across another problem: I will be using German references and I will be using references with names with "ü, ö, ä". For example: I have in references a book from "Klaus Müller" from 2004, with this code you helped me I will have [MUL04]. But what I need to get instead of this is [MUE04]. So instead of "ü" I need "ue". How should I have latex to do this? Thank you very much again. – alp May 14 '14 at 12:29
  • @alp If you use UTF8 (\usepackage[utf8]{inputenc}, make sure to set the file encoding in your .tex and .bib file accordingly) and have Müller in your .bib file, you should get "[Mül04]", which I think is right. To get "[Mue04]" we would have to go to quite a lot of modifications. – moewe May 14 '14 at 18:02
  • how complex would be the modifications for [MUE04], would that be extreme complex ? – alp May 14 '14 at 20:19
  • I see two options: Let biblatex replace every "ü", "ä", "ö", "ß" by "oe", "ae", "oe", "ss" automatically via a mapping feature, but since you want the proper spelling in the bibliography we would need to define a new field for that (in fact some new fields: authornm, shortauthornm, editornm, shorteditornm, tranbslatornm) and those would be used for the label (maybe there is a way with the upcoming biblatex 3). This gets even harder if your .bib file contains LaTeX escape sequences and not proper UTF8 characters. Why do you want this anyway? – moewe May 15 '14 at 5:06
  • Well I don't, my institute wants it so, I will try to find another way, or ask them to use Ü, Ö, Ä etc. as it is in [MÜL04]. I am also not familiar with this kind of a bibliography style and I personally think this is just ridiculous. To be honest I am not an advanced latex user, and this seems a bit too dark. Thanks for helping anyway. I will post again if I can come any further. – alp May 16 '14 at 13:32
0

If you don't like the proper way, I propose a hack:

\newcommand{\Bibkeyhack}[3]{}

use it like

author = {This Is The Author\Bibkeyhack LAU}

Full answer 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.