From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36813 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: numbered subitems Date: Mon, 1 Oct 2007 20:11:13 -0400 (EDT) Message-ID: References: <73B819D3-F847-47A7-B765-D9229297174D@princeton.edu> <5F6A7C3F-AE0A-4EC4-ACDE-4EAD4D98BC89@princeton.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1191283909 12481 80.91.229.12 (2 Oct 2007 00:11:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Oct 2007 00:11:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 02 02:11:43 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 1IcVMU-0006vl-W6 for gctc-ntg-context-518@m.gmane.org; Tue, 02 Oct 2007 02:11:43 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D820D1FC14; Tue, 2 Oct 2007 02:11:38 +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 05814-03-9; Tue, 2 Oct 2007 02:11:28 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 435D31FBCC; Tue, 2 Oct 2007 02:11:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7F4E51FBA6 for ; Tue, 2 Oct 2007 02:11:24 +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 05814-03-8 for ; Tue, 2 Oct 2007 02:11:18 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by ronja.ntg.nl (Postfix) with ESMTP id 453071FBD9 for ; Tue, 2 Oct 2007 02:11:17 +0200 (CEST) Original-Received: FROM aditya.annarb01.mi.comcast.net (adsl-68-79-103-226.dsl.sfldmi.ameritech.net [68.79.103.226]) BY hellskitchen.mr.itd.umich.edu ID 47018CA2.49412.16471 ; 1 Oct 2007 20:11:14 -0400 In-Reply-To: <5F6A7C3F-AE0A-4EC4-ACDE-4EAD4D98BC89@princeton.edu> 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:36813 Archived-At: 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 “serried” destroys the indentation of the > subitems. I could not find a clean way to do this. So, I redefined ¥checkforrepeatedlistitem. Hans, isn't there a clean way to do this? ¥setupitemize[1][fit,broad] ¥setupitemize[2][width=2em] ¥setupitemize[each][n] ¥def¥checkforrepeatedlistitem {¥ifnum¥itemlevel=¥plusone ¥initializeboxstack{item}% ¥fi ¥ifconditional¥repeatlistitem ¥savebox{item}{¥itemlevel}{¥hbox{¥copy8}}% ¥setbox8¥hbox %to ¥wd8 {¥setbox¥scratchbox¥hbox {¥scratchcounter¥itemlevel ¥advance¥scratchcounter¥minusone ¥dorecurse¥scratchcounter{¥foundbox{item}{¥recurselevel}}}% ¥ifnum¥itemlevel>¥plusone ¥ifdim¥wd¥scratchbox>¥zeropoint %¥hskip-¥dimen2 ¥box¥scratchbox ¥fi ¥fi ¥box8 }% ¥fi} ¥starttext ¥startitemize[repeat] ¥item item 1 ¥startitemize ¥item item 1.1 ¥item item 1.2 ¥item item 1.3 ¥stopitemize ¥item item 2 ¥startitemize ¥item item 2.1 ¥item item 2.2 ¥item item 2.3 ¥stopitemize ¥item item 3 ¥startitemize ¥item item 3.1 ¥item item 3.2 ¥stopitemize ¥stopitemize ¥stoptext Aditya ___________________________________________________________________________________ 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 ___________________________________________________________________________________