From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47056 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: BibTeX in ConTeXt natbib style Date: Tue, 27 Jan 2009 09:05:16 -0500 (EST) Message-ID: References: <497F116C.8080003@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233065391 26844 80.91.229.12 (27 Jan 2009 14:09:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2009 14:09:51 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 27 15:11:04 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LRoe4-0002pH-9t for gctc-ntg-context-518@m.gmane.org; Tue, 27 Jan 2009 15:10:28 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A482E1FC20; Tue, 27 Jan 2009 15:09:05 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00029-03; Tue, 27 Jan 2009 15:07:06 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8922A1FBC9; Tue, 27 Jan 2009 15:07:06 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B61771FBB9 for ; Tue, 27 Jan 2009 15:07:04 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30702-07-2 for ; Tue, 27 Jan 2009 15:06:11 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by ronja.ntg.nl (Postfix) with ESMTP id 4A84A1FBA8 for ; Tue, 27 Jan 2009 15:06:10 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter3-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n0RE65Mp025390 for ; Tue, 27 Jan 2009 15:06:07 +0100 Original-Received: FROM [192.168.2.8] (c-71-234-195-113.hsd1.ct.comcast.net [71.234.195.113]) BY hackers.mr.itd.umich.edu ID 497F14CD.8810.30920 ; 27 Jan 2009 09:06:05 -0500 In-Reply-To: <497F116C.8080003@gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 171151023 - c95021519c30 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:47056 Archived-At: On Tue, 27 Jan 2009, J.A.J. Pater wrote: > In LaTeX when using the natbib package I can use: > > \citet[p. 113]{Bell1992} to get: "Bell (1992, p.\ 112)" \cite[alternative=authoryear, extras={, p. 112}][Bell1992] > \cite[p. 113]{Bell1992} to get: "(Bell, 1992, p. 112)" \cite[alternative=authoryears, extras={, p.\ 113}][Bell1992] Aditya > 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 > ___________________________________________________________________________________ > > > ___________________________________________________________________________________ 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 ___________________________________________________________________________________