There are a couple ways to suppress labelname
in citations. The hook
\AtEveryCitekey{\clearname{labelname}}
will delete the labelname
list in every citation, but styles typically resort to printing fallback values. The authoryear
style, for example prints the labeltitle
field when labelname
is unavailable. Suppressing all fallback values often results in spurious whitespace or punctuation.
One easy way around all this is to save labelyear
into the shorthand
field.
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\DeclareBibliographyCategory{citeyear}
\addtocategory{citeyear}{companion,knuth:ct:a}
\AtEveryCitekey{%
\ifcategory{citeyear}
{\edef\cbxlabel{\thefield{labelyear}}%
\restorefield{shorthand}{\cbxlabel}}
{}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\textcite[10--11]{companion} showed that...
Filler \parencite[e.g.][10--15]{knuth:ct:a}.
Filler \textcite[10--11]{kant:ku}.
Filler \parencite[e.g.][10--15]{kant:kpv}.
\printbibliography
\end{document}

Note that the labelname
still appears in \textcite
. This is intentional. \textcite
is analogous to \citeasnoun
in the Harvard styles. Suppressing labelname
in \textcite
would be like omitting the noun in \citeasnoun
. It makes no sense.
labelyear
isn't a very meaningful citation label. So I would recommend using a shorthand based on the title or authors of the work. The above document cites two entries with shorthands from biblatex-examples.bib
. Here's an excerpt from this file.
@inbook{kant:kpv,
shorthand = {KpV},
author = {Kant, Immanuel},
title = {Kritik der praktischen Vernunft},
shorttitle = {Kritik der praktischen Vernunft},
booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
maintitle = {Kants Werke. Akademie Textausgabe},
volume = {5},
publisher = {Walter de Gruyter},
location = {Berlin},
date = {1968},
pages = {1--163},
}
@inbook{kant:ku,
shorthand = {KU},
author = {Kant, Immanuel},
title = {Kritik der Urtheilskraft},
booktitle = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
maintitle = {Kants Werke. Akademie Textausgabe},
volume = {5},
publisher = {Walter de Gruyter},
location = {Berlin},
date = {1968},
pages = {165--485},
}
shorthand
orlabel
fields. This previous post provides some details.shorthand
is a field you add to thebib
file. It overrides the whole citation label. Referring to your two main papers only by year is a little ambiguous, but you can do this by clearing thelabelname
list. Again, the answer depends on your style (authoryear
?) and exactly what output you're wanting to achieve. You should add an example to your question to clarify all this.