From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/29680 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: [off-list, urgent] Index design Date: Wed, 26 Jul 2006 09:59:22 +0200 Message-ID: <44C720DA.30901@wxs.nl> References: <56BF0DB8-002B-4A7B-9B1C-052FD982B4A5@st.estfiles.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1153900786 26890 80.91.229.2 (26 Jul 2006 07:59:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Jul 2006 07:59:46 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 26 09:59:43 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1G5eIn-0004PS-Ii for gctc-ntg-context-518@m.gmane.org; Wed, 26 Jul 2006 09:59:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4F3991FE3C; Wed, 26 Jul 2006 09:59:33 +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 14298-01-5; Wed, 26 Jul 2006 09:59:30 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 096671FE38; Wed, 26 Jul 2006 09:59:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AFFA91FE38 for ; Wed, 26 Jul 2006 09:59:26 +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 14298-01-4 for ; Wed, 26 Jul 2006 09:59:23 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with SMTP id 93AD71FE2F for ; Wed, 26 Jul 2006 09:59:23 +0200 (CEST) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 28790 for ; Wed, 26 Jul 2006 02:59:23 +0200 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) Original-To: mailing list for ConTeXt users In-Reply-To: <56BF0DB8-002B-4A7B-9B1C-052FD982B4A5@st.estfiles.de> 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.7 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:29680 Archived-At: Steffen Wolfrum wrote: > Hi Hans, > > sorry for contacting you off-list. But the publishing-house I am > working for at the moment needs to know the answer to my "Index > design" question today. > > They have a series of books with a given index (register of keywords) > designed as described below. > This design was set in the past with 3B2, and now is the question: is > it also possible to set it (in this strange way) with ConTeXt? > > > Please see my description below (hope gets it's clear): > > Is it possible, in an index, not to have single letters as separators > (here "a", "w") in a dedicated line, but instead only the first letter of > the first entry with "a" or "w" set bold? > > See this minimal example: > > \setupoutput[pdftex] > > \starttext > \chapter{First Chapter} > Some text...\index{word} > > \section {First Section} > Some text...\index{word} > Some text...\index{another entry} > Some text...\index{ansi} > Some text...\index{another entry} > > \page[yes] > \completeindex > > \stoptext > > > > Here I would like to have only the first letter of the index entries > "another" and "word" in the index to be set bold. > > Y inofficial hook; remind me when the time is there that you need it because it needs to be hooked in somewhere else \unprotect \def\dosetpageregisterentrya#1#2% {\edef\currententrylevel{1}% \global\let\c!entryb\relax \global\let\c!entryc\relax \gdef\c!entrya {\iffirstregisterentry\else\endgraf\fi % new \global\firstregisterpagetrue \hangindent1em\noindent\c!entryreference \dohandleregisterentry{\executeifdefined {\??id#1\c!deeptextcommand}\firstofoneargument{#2}}% \global\firstregisterentryfalse \global\firstsubentrytrue \global\firstsubsubentrytrue}} \def\HowUgly#1{\doHowUgly#1\relax} \def\doHowUgly#1#2\relax{\iffirstregisterentry{\bf#1}\else#1\fi#2} \setupregister[index][indicator=no,deeptextcommand=\HowUgly] \starttext \chapter{First Chapter} Some text...\index{word} \section {First Section} Some text...\index{word} Some text...\index{another entry} Some text...\index{ansi} Some text...\index{another entry} \page[yes] \completeindex \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 -----------------------------------------------------------------