1

The guideline says, that the citation style must have four letters of the author, a nonbreakable space and the last two digits of the year. Using BibLaTeX with the option 'style=alphabetic' comes close. But this style only uses three letters and does lack the space.

Here comes the MWE:

\begin{filecontents}{\jobname.bib}
@book{longfellow:limmericks,
  author    = {Longfellow, Louis},
  title     = {Long Lasting Last Limmericks},
  publisher = {Limmerick Lounge},
  year      = {2022}
}
\end{filecontents}

\documentclass{scrartcl}

\usepackage[style=alphabetic]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
\cite{longfellow:limmericks}
\printbibliography
\end{document}

This is what is looks like. Instead of the demanded [Long 22] it gives [Lon22].

Output with only 3 letters

How to change this?

4
  • 2
    How do you want multiple author works to appear?
    – Alan Munn
    Commented Nov 22, 2020 at 21:09
  • I would want the numeric style to be used, but I am in no position to make a choice. As in DG's solution, only the first author should be considered :-(
    – Jan
    Commented Nov 23, 2020 at 13:40
  • 1
    The reason I asked is that the label system is sophisticated enough to make labels out of multiple authors, e.g. using the first letter of each author (up to some maximum).
    – Alan Munn
    Commented Nov 23, 2020 at 14:49
  • @AlanMunn Maybe you have guessed from my answer, that I would really appreciate, if the system would respect the other authors as well. But as said above: I am not in the position to make choices.
    – Jan
    Commented Nov 23, 2020 at 15:07

1 Answer 1

3

You can use \DeclareLabelalphaTemplate to format the label:

\begin{filecontents}{\jobname.bib}
@book{longfellow:limmericks,
  author    = {Longfellow, Louis},
  title     = {Long Lasting Last Limmericks},
  publisher = {Limmerick Lounge},
  year      = {2022}
}
\end{filecontents}

\documentclass{scrartcl}

\usepackage[style=alphabetic]{biblatex}
\DeclareLabelalphaTemplate{
   \labelelement{
      \field[strwidth=4,strside=left,names=1,noalphaothers=true]{labelname}
   }
   \labelelement{
      \literal{\nobreakspace}
   }
   \labelelement{
      \field[strwidth=2,strside=right]{year}
   }
}

\addbibresource{\jobname.bib}

\begin{document}
\cite{longfellow:limmericks}
\printbibliography
\end{document}

enter image description here

1
  • I love LaTeX for its versatility and this community for sharing generously its knowledge. :-) Thank you very much for this answer. Works perfect!
    – Jan
    Commented Nov 23, 2020 at 6:48

You must log in to answer this question.

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