From: Daniel Schopper <daniel.schopper@aon.at>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: author-title cite command
Date: Fri, 03 Aug 2012 14:44:49 +0200 [thread overview]
Message-ID: <501BC7C1.8050006@aon.at> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2012-08-03 12:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-03 12:44 Daniel Schopper [this message]
2012-08-03 12:49 ` Daniel Schopper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501BC7C1.8050006@aon.at \
--to=daniel.schopper@aon.at \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).