[Tex/LaTex] Use BibTeX key as the cite key

biblatexbibliographiesciting

I tried to use natbib and other attempts but for vain. I would like to produce a cite key which is identical to the BibTeX entry. For example, if I have a BibTeX entry Bt98, then I want \cite{Bt98} to produce something like [Bt98].

Any ideas how can I accomplish this?

Best Answer

Here's a biblatex solution with a properly formatted bibliography.

\documentclass{article}

\usepackage[style=alphabetic,sorting=debug]{biblatex}

\DeclareFieldFormat{labelalpha}{\thefield{entrykey}}
\DeclareFieldFormat{extraalpha}{}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{whatever,
  author = {Author, A.},
  year = {2001},
  title = {Testing the effects of biblatex styles on bibliography formatting},
}
@misc{B02f,
  author = {Buthor, B.},
  year = {2002},
  title = {First},
}
@misc{B02s,
  author = {Buthor, B.},
  year = {2002},
  title = {Second},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here

(The filecontents environment is only used to include some external files directly into the example, so that it compiles. It is not necessary for the solution.)