From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/44996 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Reference to a subitem Date: Thu, 23 Oct 2008 09:22:32 +0200 Message-ID: <115224fb0810230022x413a048dl90db8d24ca6bb00b@mail.gmail.com> References: <83e5fb980810221555k3e24caben36af44d360cf9207@mail.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" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224746654 18499 80.91.229.12 (23 Oct 2008 07:24:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2008 07:24:14 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 23 09:25:15 2008 connect(): Connection refused 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 1KsuZF-0000hg-Bz for gctc-ntg-context-518@m.gmane.org; Thu, 23 Oct 2008 09:25:13 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B1F921FA41; Thu, 23 Oct 2008 09:24:02 +0200 (CEST) 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 00366-01-17; Thu, 23 Oct 2008 09:23:08 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C5EF81FC07; Thu, 23 Oct 2008 09:23:07 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2AD5C1FC07 for ; Thu, 23 Oct 2008 09:23:06 +0200 (CEST) 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 00366-01-16 for ; Thu, 23 Oct 2008 09:22:33 +0200 (CEST) Original-Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by ronja.ntg.nl (Postfix) with ESMTP id EB1031FB7F for ; Thu, 23 Oct 2008 09:22:32 +0200 (CEST) Original-Received: by mu-out-0910.google.com with SMTP id w9so185748mue.4 for ; Thu, 23 Oct 2008 00:22:32 -0700 (PDT) Original-Received: by 10.103.231.15 with SMTP id i15mr116711mur.124.1224746552765; Thu, 23 Oct 2008 00:22:32 -0700 (PDT) Original-Received: by 10.103.215.10 with HTTP; Thu, 23 Oct 2008 00:22:32 -0700 (PDT) In-Reply-To: <83e5fb980810221555k3e24caben36af44d360cf9207@mail.gmail.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:44996 Archived-At: On Thu, Oct 23, 2008 at 12:55 AM, Diego Depaoli wrote: > Hi all, > referencing a subitem I get also the item (1.a, 2.c and so on). > Can I split them or get only the subitem? > > \starttext > \startitemize [n] > \item [number] one > \startitemize [a] > \item [letter] letter > \stopitemize > \stopitemize > Look at number \in[number] letter \in[letter] > \stoptext > > Normal output: > Look at number 1 letter 1.a > > Wanted result > Look at number 1 letter a \def\ItemNumber#1% {\expandafter\doItemNumber#1..\relax} \def\doItemNumber#1.#2.#3\relax {\doifelsenothing{#2} {#1} {#2}} \definereferenceformat[initem][left=\ItemNumber] \starttext \startitemize[n] \item[number] one \startitemize [a] \item[letter] letter \stopitemize \stopitemize Look at \initem{number}[number] \initem{letter}[letter] \stoptext Regards, Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________