* author-title cite command
@ 2012-08-03 12:44 Daniel Schopper
2012-08-03 12:49 ` Daniel Schopper
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Schopper @ 2012-08-03 12:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: author-title cite command
2012-08-03 12:44 author-title cite command Daniel Schopper
@ 2012-08-03 12:49 ` Daniel Schopper
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Schopper @ 2012-08-03 12:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-03 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-03 12:44 author-title cite command Daniel Schopper
2012-08-03 12:49 ` Daniel Schopper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).