ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Vit Zyka <vit.zyka@gmail.com>
To: ConTeXt <ntg-context@ntg.nl>
Subject: register: spurious space & one more entry level ask
Date: Wed, 19 Sep 2007 20:44:36 +0200	[thread overview]
Message-ID: <46F16E14.8010107@seznam.cz> (raw)

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}

    Test file:
    --------------
    \starttext
      Text\index{test}.
      \page[yes]
      Paragraph\index{test}.
      \placeindex
    \stoptext
    --------------

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?

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.

Best
Vit

___________________________________________________________________________________
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
___________________________________________________________________________________


             reply	other threads:[~2007-09-19 18:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 18:44 Vit Zyka [this message]
2007-09-19 19:44 ` Hans Hagen
2007-09-19 21:17   ` Vit Zyka
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=46F16E14.8010107@seznam.cz \
    --to=vit.zyka@gmail.com \
    --cc=ntg-context@ntg.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).