EDIT
A shorter solution is to modify the alphabetic
style. Just force the label
to be set to citekey
.
\DeclareLabelalphaTemplate{
\labelelement{
\field[final]{citekey}
}
}
And we're done.
\documentclass{article}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,url=true,style=alphabetic]{biblatex}
\usepackage{filecontents}
\addbibresource{biblatex-examples.bib}
\DeclareLabelalphaTemplate{
\labelelement{
\field[final]{citekey}
}
}
\begin{document}
\cite{wilde,westfahl:space}
\printbibliography
\end{document}
Initial solution
You might like this slight modification of the numeric
style.
We make the cite
bibmacro just print the entrykey
.
\DeclareFieldFormat{key}{#1}
\renewbibmacro*{cite}{%
\printtext[bibhyperref]{\printfield[key]{entrykey}}}
We also have to redefine the bibliography.
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield[key]{entrykey}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
I can't help but feel that the label width thing could be improved, but for very long labels that could also go awry.
\documentclass{article}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,url=true,style=numeric]{biblatex}
\usepackage{filecontents}
\addbibresource{biblatex-examples.bib}
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield[key]{entrykey}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\DeclareFieldFormat{key}{#1}
\renewbibmacro*{cite}{%
\printtext[bibhyperref]{\printfield[key]{entrykey}}}
\begin{document}
\cite{wilde,westfahl:space}
\printbibliography
\end{document}
\documentclass{...}
and ending with\end{document}
.debug
style, but I wouldn't recommend that as the real solution. See section 3.3.1 of the biblatex guide for the default styles, and section 4.3 for how to write your own citation styles.