BibTeX, biblatex and biber ⇒ Change Citation Label Style
Change Citation Label Style
I am using BibTex.
I am looking for an easy way to make the citation labels in my text look like this:
[ABC12]
where ABC are the first 3 letters of the author's name and 12 is the year of publishing (like the alpha-style)
I need the "ABC" to be upper-case, even if there is only one author. Is there an easy way to achieve this?
Thanks for your help.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Change Citation Label Style
Welcome to the LaTeX community!
I rarely use the classic BiBTeX so I can't help there. It is doable with biblatex by redefining the labelalpha template, though:
Code: Select all
\documentclass{article}
\usepackage[backend=biber,style=alphabetic]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareLabelalphaTemplate{
\labelelement{
\field[uppercase,final]{shorthand}
\field[uppercase]{label}
\field[uppercase,strwidth=3,strside=left,ifnames=1]{labelname}
\field[uppercase,strwidth=1,strside=left]{labelname}
}
\labelelement{
\field[strwidth=2,strside=right]{year}
}
}
\begin{document}
Text \cite{knuth:ct:a,knuth:ct:b,knuth:ct:c,companion}
\printbibliography
\end{document}