I have asked the following in several boards, but without any success.

Please consider biblatex commands to define Categories and assign a Category to a .bib entry:

``````\DeclareBibliographyCategory{AAA}
``````

My question is: is there a way to retrieve a category, given an entry? i.e., something like `\CatOfBook{aaa}` --> AAA ?

I do not know anything about LaTeX programming, but I suspect you need to add a new functionality somewhere into the biblatex.sty file. I appreciate very much any hint, or just an explanation on how difficult it could be.

The broader reason why I think I need this is the following. I use to section my bibliography thanks to the category commands above and:

``````\printbibliography[heading=AAA,category=aaa]
``````

and the result is something like

``````section AAA
Aut90 ----
Aut93b ----

section BBB
Aut92---
Aut93a --
``````

(the same author has books of many different categories)

I would like to have a kind of `\cite` command such that it outputs something like: `A-Aut90, B-Aut93a, A-Aut93b`.

I hope I made clear my issue

-
@mario: Welcome to tex.sx! Note that it is unusual around here to sign your questions (as there is already a box with your username below it) or to have any greeting. A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). –  lockstep Feb 24 '11 at 8:18
I assume there is some broader reason to need to do this: perhaps you could explain what the desired outcome is, as this might impact on the answer. –  Joseph Wright Feb 24 '11 at 8:18
@mario: Just to add that a quick look at `biblatex.sty` suggests that you'd need to know all of the categories defined and check each one, due to the way this information is actually stored. So some more insight really would be handy. –  Joseph Wright Feb 24 '11 at 8:24
@mario: Another fact which you may not be aware of (and which may be important for the desired outcome): It is admissible to assign more than one categorey to the same entry key. –  lockstep Feb 24 '11 at 12:13
See my improved question. Thanks. –  mario Feb 27 '11 at 21:38

forget my previous message.

Biblatex has been updated with exactly what I was looking for. If you are interested, please look at option prefixnumbers (Added option prefixnumbers to \printbibliography 2010-08-04; Added support for prefixnumbers to bibliography style alphabetic 2011-01-05).

For the kind of output you get, please look at http://www.ctan.org/tex-archive/macros/latex/exptl/biblatex/doc/examples/19-alphabetic-prefixed.tex // .pdf

To implement crossref between bibliographic items, I use the following code

``````\DeclareCiteCommand{\bbx@crossref}%
{}
{\ifsingletitle%
{\printtext[bibhyperref]{\printnames{labelname}}%
\setunit{\space}}%
{
\printtext[bibhyperref]{[%
\printfield[citetitle:book]{prefixnumber}%
\printfield{labelalpha}%
\printfield{extraalpha}]}
}}%
{}%
{}
``````

and redeclare drivers for incollection and inbook types by something like:

``````\DeclareBibliographyDriver{incollection}{%
......
\iffieldundef{crossref}%
{}
{\printtext{\setunit{\unspace}}
\printtext{\bbx@crossref{\thefield{crossref}}}%
\newunit\newblock
}
``````

Biblatex is indeed amazing!