4

Consider the following bibliography example using alphabetic style, maxalphanames = 1 and deactivated + in case of multiple authors:

enter image description here

How can achieve a complete 4-digit year in the label? So in this case the desired output would be: Baa1989

I found a source explaining how to define a complete custom label. But I have a hard time believing that there is no simpler more generic switch to switch. Couldn't find any in the manual.

I'm looking for a solution for biblatex + biber.

Thank you.


MWE

\begin{filecontents}{references.bib}
@InProceedings{Baader1989,
  Title                    = {Direct self control of inverter-fed induction machine, a basis for speed control without speed-measurement},
  Author                   = {Baader, U. and Depenbrock, M. and Gierse, Georg},
  Booktitle                = {Industry Applications Society Annual Meeting, 1989., Conference Record of the 1989 IEEE},
  Year                     = {1989},
  Month                    = {Oct},
  Pages                    = {486-492 vol.1},
}
\end{filecontents}

\documentclass{article}

\usepackage[style=alphabetic,%
            backend=biber,
            maxnames=99,
            maxalphanames=1,    
            backref=true,
            doi=false,isbn=false,url=false,
            backref=false,
            ]{biblatex}
\renewcommand*{\labelalphaothers}{}

\bibliography{references.bib} 

\begin{document}
Citation: \cite{Baader1989}
\printbibliography
\end{document}
2
  • Just go with \DeclareLabelalphaTemplate{ \labelelement{ \field[final]{shorthand} \field{label} \field[strwidth=3,strside=left,ifnames=1,pcompound=true]{labelname} \field[strwidth=1,strside=left,pcompound=true]{labelname} } \labelelement{ \field{year} } } (line breaks not to scale).
    – moewe
    Commented Jan 28, 2016 at 8:24
  • I really thought there would be a duplicate on this site, but I couldn't find one, so I went ahead and answered. We have the similar Biblatex alphabetic style like Smith, 2005, but there something else is going on.
    – moewe
    Commented Jan 28, 2016 at 8:31

1 Answer 1

5

As far as I can see you will have to resort to \DeclareLabelalphaTemplate, but that is not too bad.

We can just copy the default from biblatex.def and change \field[strwidth=2,strside=right]{year} to \field{year}

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

and that's it.

MWE

\begin{filecontents}{\jobname.bib}
@InProceedings{Baader1989,
  Title                    = {Direct self control of inverter-fed induction machine, a basis for speed control without speed-measurement},
  Author                   = {Baader, U. and Depenbrock, M. and Gierse, Georg},
  Booktitle                = {Industry Applications Society Annual Meeting, 1989., Conference Record of the 1989 IEEE},
  Year                     = {1989},
  Month                    = {Oct},
  Pages                    = {486-492 vol.1},
}
\end{filecontents}

\documentclass{article}

\usepackage[style=alphabetic,%
            backend=biber,
            maxnames=99,
            maxalphanames=1,    
            backref=true,
            doi=false,isbn=false,url=false,
            backref=false,
            ]{biblatex}
\renewcommand*{\labelalphaothers}{}

\addbibresource{\jobname.bib} 

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

\begin{document}
Citation: \cite{Baader1989}
\printbibliography
\end{document}
2
  • What does pcompound = true do? It is undefined und throws and error. Leaving that out everyhting seems to work. Commented Jan 28, 2016 at 9:09
  • 1
    @thewaywewalk pcompound is a new option that was introduced in biblatex 3.2. It is the compound equivalent for name prefixes. It was implemented because of LNI/alpha style at BibLaTeX with the usage of multiple “von” parts. Either make an update of biblatex and Biber, or just drop the pcompound=true.
    – moewe
    Commented Jan 28, 2016 at 10:08

You must log in to answer this question.

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