Sorry, got the wrong URL. That's the right one: http://article.gmane.org/gmane.comp.tex.context/68200/ Am 03.08.12 14:44, schrieb Daniel Schopper:
Dear list, I'm trying to come to grips with creating a customized author-title cite command, based on this[1] thread. I was wondering how I can check on the value of the [artauthor] or [author] fields extracted by \getcitedata? Eventually I'd need a footnote citation style that prints a full citation for the first reference and then uses a author-title style for the subsequent ones: For @incollection only author and title of the article, for @book the author and title of the book. Which is why I'd need to for the existance of an artauthor… Or how can I just grab the bibtex-type? \getcitedata[bibtype] doesn’t seem to return anything.
I guess this should be quite easy for someone more experienced. TIA, Daniel
\setupbibtex [database=sample] \setuppublications[alternative=apa]
\def\MYauthor#1#2#3#4#5{#3}
\def\specialcite#1[#2]% {\bgroup \getcitedata[author1][#2] to \mauthors \getcitedata[artauthor1][#2] to \martauthors \getcitedata[arttitle][#2] to \marttitle \getcitedata[title][#2] to \mtitle \getcitedata[bibtype][#2] to \mbibtype \doifsomethingelse{\marttitle}{\marttitle}{\mtitle} % This works % % Pseudo-Code: \doifsomethingelse{\martauthors}{\martauthors}{\mauthors} % This, of course, doesn't \mbibtype % This neither \egroup}
\starttext
\cite[hh2010a]
\cite[Eijkhout1991]
\specialcite[hh2010a]
\specialcite[Eijkhout1991]
\stoptext
[1] http://www.mail-archive.com/ntg-context@ntg.nl/msg55534.htm ___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________