From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36886 Path: news.gmane.org!not-for-mail From: Alan Bowen Newsgroups: gmane.comp.tex.context Subject: Re: numbered subitems Date: Thu, 4 Oct 2007 08:55:01 -0400 Message-ID: References: <73B819D3-F847-47A7-B765-D9229297174D@princeton.edu> <5F6A7C3F-AE0A-4EC4-ACDE-4EAD4D98BC89@princeton.edu> <4DDF8044-6E42-40AB-94EF-3FCF49ED1F08@princeton.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1191512602 16483 80.91.229.12 (4 Oct 2007 15:43:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Oct 2007 15:43:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 04 17:43:19 2007 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 1IdSqV-0002B4-1Q for gctc-ntg-context-518@m.gmane.org; Thu, 04 Oct 2007 17:42:39 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BE8C91FE2D; Thu, 4 Oct 2007 17:42:23 +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 18683-04-32; Thu, 4 Oct 2007 17:42:03 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4CE631FA39; Thu, 4 Oct 2007 17:40:03 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2FF771FAAB for ; Thu, 4 Oct 2007 17:39:55 +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 18683-04-18 for ; Thu, 4 Oct 2007 17:39:48 +0200 (CEST) Original-Received: from gold.muskoka.com (gold.muskoka.com [204.16.100.5]) by ronja.ntg.nl (Postfix) with ESMTP id 232EC1FA39 for ; Thu, 4 Oct 2007 14:55:18 +0200 (CEST) Original-Received: from [204.16.103.115] (muskoka-ppp2-204-16-103-115.muskoka.com [204.16.103.115]) by gold.muskoka.com (Postfix) with ESMTP id 39F50C3C3F for ; Thu, 4 Oct 2007 08:55:03 -0400 (EDT) In-Reply-To: X-Mailer: Apple Mail (2.752.3) 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:36886 Archived-At: Hi, Aditya=97 This works perfectly (after changing the Yen-signs for backslashes). = It behaves as expected when adapted and will be a great help in = producing a number of the TOCs that are on my horizon. Many thanks = for your time and help! All best, Alan > On Oct 1, 2007, at 8:11 PM, Aditya Mahajan wrote: > >> Hi Alan, >> On Mon, 1 Oct 2007, Alan Bowen wrote: >>> 1. History >>> 1.1 Pre-Greek (Babylonian and Egyptian) sundials >>> 1.2 Greek and Roman sundials >>> 1.3 Byzantine sundials >>> is the goal. Sadly, adding =93serried=94 destroys the indentation of the >>> subitems. >> I could not find a clean way to do this. So, I redefined >> =A5checkforrepeatedlistitem. Hans, isn't there a clean way to do this? >> =A5setupitemize[1][fit,broad] >> =A5setupitemize[2][width=3D2em] >> =A5setupitemize[each][n] >> =A5def=A5checkforrepeatedlistitem >> {=A5ifnum=A5itemlevel=3D=A5plusone >> =A5initializeboxstack{item}% >> =A5fi >> =A5ifconditional=A5repeatlistitem >> =A5savebox{item}{=A5itemlevel}{=A5hbox{=A5copy8}}% >> =A5setbox8=A5hbox %to =A5wd8 >> {=A5setbox=A5scratchbox=A5hbox >> {=A5scratchcounter=A5itemlevel >> =A5advance=A5scratchcounter=A5minusone >> =A5dorecurse=A5scratchcounter{=A5foundbox{item} = >> {=A5recurselevel}}}% >> =A5ifnum=A5itemlevel>=A5plusone >> =A5ifdim=A5wd=A5scratchbox>=A5zeropoint >> %=A5hskip-=A5dimen2 >> =A5box=A5scratchbox >> =A5fi >> =A5fi >> =A5box8 }% >> =A5fi} >> =A5starttext >> =A5startitemize[repeat] >> =A5item item 1 >> =A5startitemize >> =A5item item 1.1 >> =A5item item 1.2 >> =A5item item 1.3 >> =A5stopitemize >> =A5item item 2 >> =A5startitemize >> =A5item item 2.1 >> =A5item item 2.2 >> =A5item item 2.3 >> =A5stopitemize >> =A5item item 3 >> =A5startitemize >> =A5item item 3.1 >> =A5item item 3.2 >> =A5stopitemize >> =A5stopitemize >> =A5stoptext >> Aditya ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________