From: Vit Zyka <vit.zyka@gmail.com>
To: Hans Hagen <pragma@wxs.nl>, ConTeXt <ntg-context@ntg.nl>
Subject: Re: register: spurious space & one more entry level ask
Date: Wed, 19 Sep 2007 23:17:03 +0200 [thread overview]
Message-ID: <46F191CF.9060505@seznam.cz> (raw)
In-Reply-To: <46F17C2C.9080708@wxs.nl>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2007-09-19 21:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 18:44 Vit Zyka
2007-09-19 19:44 ` Hans Hagen
2007-09-19 21:17 ` Vit Zyka [this message]
2007-09-20 7:27 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46F191CF.9060505@seznam.cz \
--to=vit.zyka@gmail.com \
--cc=ntg-context@ntg.nl \
--cc=pragma@wxs.nl \
--cc=vit.zyka@seznam.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).