ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* BibTeX in ConTeXt natbib style
@ 2009-01-27 13:51 J.A.J. Pater
  2009-01-27 14:05 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: J.A.J. Pater @ 2009-01-27 13:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

In LaTeX when using the natbib package I can use:

\citet[p. 113]{Bell1992} to get: "Bell (1992, p. 112)"
\cite[p. 113]{Bell1992} to get: "(Bell, 1992, p. 112)"

Trying to do this in ConTeXt I came up with this:

\setupcite [author][left=,right=]
\setupcite [year][left=,right=]

\def\CiteP#1#2%
    {(\cite[author][{#2}]%
    ,\ \cite[year][{#2}]%
    ,\ {#1}
)}

\CiteP{p. 13}{article-full}

And:

\def\CiteA#1#2%
    {\cite[author][{#2}]%
    \ (\cite[year][{#2}]%
    ,\ {#1}
)}

\CiteA{p. 13}{article-full}


It works alright, but it seems rather crude to me.
Is there a more elegant way?
Or maybe more to the point: a way in which I do not have to use \setupcite?

Thanks in advance,

Adriaan.

P.S. I made my first contribution to the wiki: 
http://wiki.contextgarden.net/Version_Control

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-27 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-27 13:51 BibTeX in ConTeXt natbib style J.A.J. Pater
2009-01-27 14:05 ` Aditya Mahajan
2009-01-27 14:18   ` J.A.J. Pater

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).