On 05/05/2011 01:55 PM, Oliver Buerschaper wrote:
I'm in need for a few custom cite commands like these:
1. \cite[alternative=authortitle, extras={, p.\,13}][citekey] should yield
{\sc AuthorLastName}, AuthorFirstName, {\it title}, p.\,13
2. \cite[alternative=title][citekey]
{\it title}
How would I code these commands?
There is no quick answer to this. The easiest way is to use the \getcitedata command to create a dedicated macro for the class you need, and that is explained in the bib module manual.
Otherwise, you will have to dive into the sources to see how e.g. '\bibauthoryearref' and '\bibshortref' are implemented. If you create the \bibtitleref and \bibauthortitleref macros, these will be executed automatically.
Many thanks, Taco!
I'm realizing I asked you the same kind of question three years beforeā¦ apologies for forgetting. In any case I've just tried the solution you gave me back then (based on \getcitedata) but unfortunately it doesn't work any longer: the \specialcite command below doesn't output anything for me.
Subtle incompatibility here: you need \def\specialcite#1[#2]% {\bgroup \getcitedata[artauthor1][#2] to \mauthors \getcitedata[arttitle][#2] to \mtitle \expandafter\MYauthor\mauthors: {\it\mtitle}% \egroup} for current mkiv. Best wishes, Taco