From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33692 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: An Index problem (repost II) Date: Tue, 06 Mar 2007 10:57:18 +0100 Message-ID: <45ED3AFE.80301@wxs.nl> References: 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: sea.gmane.org 1173175050 16163 80.91.229.12 (6 Mar 2007 09:57:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2007 09:57:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 06 10:57:21 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 1HOWQ4-00055E-7h for gctc-ntg-context-518@m.gmane.org; Tue, 06 Mar 2007 10:57:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 235101A2; Tue, 6 Mar 2007 10:53:02 +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 18197-01-34; Tue, 6 Mar 2007 10:52:57 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0D95A19E; Tue, 6 Mar 2007 10:52:57 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2CC4B19D for ; Tue, 6 Mar 2007 10:52:55 +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 17810-05-30 for ; Tue, 6 Mar 2007 10:52:53 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with ESMTP id 9AC4119C for ; Tue, 6 Mar 2007 10:52:53 +0100 (CET) Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 11953 for ; Tue, 06 Mar 2007 10:57:08 +0100 User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) In-Reply-To: X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 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:33692 Archived-At: luigi scarso wrote: > I have the following > \starttext > %%\placemaincontent > \chapter{AAA} > \section{Hause one} Foo one \page > \section{Hause two} Foo two \page > \section{Hause three} Foo three \page > \section{Hause four} Foo four\page > \section{Dog boo} Koo \page > \section{Dog foo} Boo \page > \section{Money ba} Boo \page > \section{Mail bee} Ugh \page > \stoptext > In main content I should like to have > \bf{AAA} %% no problem here > \bf{HAUSE} one ..... page x > Hause two ..............page x > Hause three............page x > Hause four ..............page x > \bf{DOG} boo ...........page x > Dog foo.....................page x > \bf{MONEY} ba.........page x > \bf{MAIL} bee.............page x > > ie, the very first word in bold face and upper case, > the following in normal face if and only of the very first word was > equal to the first > word of actual item (I know, it's strange). > \let\LastSectionEntry\empty \def\ChapterEntry#1% {\global\let\LastSectionEntry\empty #1} \def\SectionEntry#1% {\splitstring#1\at{ }\to\PartA\and\PartB \doifelse\PartA\LastSectionEntry {#1} {\global\let\LastSectionEntry\PartA {\bf\PartA} \PartB}} \setuplist[chapter][style=bold,textcommand=\ChapterEntry] \setuplist[section][textcommand=\SectionEntry] \starttext \placelist[chapter,section] \chapter{AAA} \section{Hause one} Foo one \page \section{Hause two} Foo two \page \section{Hause three} Foo three \page \section{Hause four} Foo four\page \section{Dog boo} Koo \page \section{Dog foo} Boo \page \section{Money ba} Boo \page \section{Mail bee} Ugh \page \chapter{BBB} \section{Mail bee} Ugh \page \section{Mail bee} Ugh \page \section{Mail bee} Ugh \page \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------