From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36686 Path: news.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: register: spurious space & one more entry level ask Date: Wed, 19 Sep 2007 23:17:03 +0200 Message-ID: <46F191CF.9060505@seznam.cz> References: <46F16E14.8010107@seznam.cz> <46F17C2C.9080708@wxs.nl> Reply-To: vit.zyka@seznam.cz, 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 1190236642 20242 80.91.229.12 (19 Sep 2007 21:17:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2007 21:17:22 +0000 (UTC) To: Hans Hagen , ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 19 23:17:08 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 1IY6ux-0001hy-K9 for gctc-ntg-context-518@m.gmane.org; Wed, 19 Sep 2007 23:17:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 50D04200A8; Wed, 19 Sep 2007 23:17:05 +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 01868-03-2; Wed, 19 Sep 2007 23:16:55 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B01BD2009C; Wed, 19 Sep 2007 23:16:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 74C9B2009C for ; Wed, 19 Sep 2007 23:16:52 +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 01533-03-2 for ; Wed, 19 Sep 2007 23:16:45 +0200 (CEST) Original-Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by ronja.ntg.nl (Postfix) with ESMTP id D51BE20097 for ; Wed, 19 Sep 2007 23:16:42 +0200 (CEST) Original-Received: by ug-out-1314.google.com with SMTP id h2so317443ugf for ; Wed, 19 Sep 2007 14:16:42 -0700 (PDT) Original-Received: by 10.78.180.18 with SMTP id c18mr763160huf.1190236601838; Wed, 19 Sep 2007 14:16:41 -0700 (PDT) Original-Received: from ?192.168.1.24? ( [82.208.57.182]) by mx.google.com with ESMTPS id 3sm549263huc.2007.09.19.14.16.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 Sep 2007 14:16:40 -0700 (PDT) User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <46F17C2C.9080708@wxs.nl> 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:36686 Archived-At: Jupiiiii! Both patches (space & 4-level entry) work well as I can test them till now. I will do some testing on a real and big document in a near future. Do you intend to incorporate both patches to the distribution? Thank you Hans for extremely quick solutions Vit Hans Hagen wrote: > Vit Zyka wrote: >> Dear ConTeXters, >> >> there are 3 topics dealing with register (index): >> >> 1. [Spurious space] There are entries like >> \registerpage{index}{,}{5}{2--1-1-0-1-0-0-0--1}{2} >> in a *.tuo file. Since the definition (core-reg.tex) >> \def\dosetpageregisterpage#1#2#3#4#5#6% >> {\doifreglevelelse[#5]% >> {\dodosetpageregisterpage{#1}{#2}{#3}{#4}{#5}{#6}}% >> {}} >> there will be a spurious space between page number like >> Entry 23 , 67 >> instead of >> Entry 23, 67 >> >> Solution: >> \def\dosetpageregisterpage#1#2#3#4#5#6% >> {\doifreglevelelse[#5]% >> {\dodosetpageregisterpage{#1}{#2}{#3}{#4}{#5}{#6}}% >> {}\ignorespaces} > > interesting that no one noticed this before ... in core-uti.tex pushing > the line ending was messed up when changing to catcode tables (well, > pseudo ones in mkii) > > \long\def\doutilities#1#2#3#4#5% % introduceren in utility file > {\resetutilities > % more than one utility thing can be handled in one pass, > % for instance lists, so we process ##1 as list > \def\douticommand##1{\csname\s!set##1\endcsname}% > \processcommacommand[#1]\douticommand > \begingroup > \def\currentutilityfilename{#2}% > \notesenabledfalse > \doinpututilitiestrue > \global\utilitydonefalse > \pushcatcodetable > \setcatcodetable\ctxcatcodes > \pushendofline % <<<<<<<<<<<<<<<<<<<<<<<<< > \ifunprotectutilities % nog nodig ? > \unprotect > \fi > > >> 2. [feature request] Current register implementation enable upto three >> entry level (\index{level 1+level 2+level 3}). My custommer require 4 >> levels. Please could the entry number be extended? > > not trivial, since we then need to adapt texutil too + a bunch of > macros; adapting mkiv may be easier > >> 3. [not important, just for info] Formating of the register entries is >> not much user friendly. See \hangindent1em in a following definition: >> >> \def\dosetpageregisterentrya#1#2% >> {\flushseenregisterpage >> \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 >> \dohandlepageregisterentry{#1}{#2}% >> \global\firstregisterentryfalse >> \global\firstsubentrytrue >> \global\firstsubsubentrytrue}} >> >> So, when one want the change formating he has to redefine this >> definition. It is against a ConTeXt spirit. > > some day there will be a better interface (probably only in mkiv) > > Hans > > ----------------------------------------------------------------- > 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 > ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________