ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Indexes
@ 2002-05-21 19:35 Simon Pepping
  2002-05-21 21:21 ` Indexes Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Pepping @ 2002-05-21 19:35 UTC (permalink / raw)


Hi,

I have a few questions regarding indexes.

1. \completeindex generates a numbered chapter. Is there a way to make
   this unnumbered?

2. Is there a way to suppress the index when there are no index terms,
   in other words, can I let Context detect whether there are index
   terms? I tried \doifmode{*index}{\completeindex}, but that does not
   seem to do what I want.

3. In the recent beta, which I downloaded on 11 May, \completeindex
   generates an erroneous ToC entry, viz. titleindex. I traced this
   back to an \xdef that does not do what it probably was meant to do:

\convertmeaning #1\to ->\bgroup \honorunexpanded \dontexpandencoding \xdef \@@g
lobalexpanded {#1}\xdef \@@globalexpanded {\@@globalexpanded }\egroup \convertc
ommand \@@globalexpanded \to 
#1<-\headtext {\v!index }

\headtext ->\let \handletextprefix \firstoftwoarguments \dogetupsometextprefix 
\headlanguage \c!titel 

\firstoftwoarguments #1#2->#1
#1<-\dogetupsometextprefix 
#2<-\headlanguage 

\c!titel ->\c!internal! titel
{\string}

\v!index ->index
{\xdef}

\@@globalexpanded ->\let \handletextprefix \dogetupsometextprefix titel{index}

The \let does not work well in \xdef; instead, \firstoftwoarguments is
expanded. I cannot think of a way to correct this.

Regards,
Simon

-- 
Simon Pepping
email: spepping@scaprea.hobby.nl


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Indexes
  2002-05-21 19:35 Indexes Simon Pepping
@ 2002-05-21 21:21 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2002-05-21 21:21 UTC (permalink / raw)
  Cc: ntg-context

At 09:35 PM 5/21/2002 +0200, Simon Pepping wrote:
>Hi,
>
>I have a few questions regarding indexes.
>
>1. \completeindex generates a numbered chapter. Is there a way to make
>    this unnumbered?

numbered sections become unnumbered when used in:

\startbackmatter

\stopbackmatter

(als also in \startfrontmatter .. \stopfrontmatter; you can guess what 
happens in \startappendices \stopappendices; this is why sectionblocks are 
there)

>2. Is there a way to suppress the index when there are no index terms,
>    in other words, can I let Context detect whether there are index
>    terms? I tried \doifmode{*index}{\completeindex}, but that does not
>    seem to do what I want.

you're nearly there:

first do a trial run:

   \determineregistercharacteristics[index][optional settings]

next test for a system mode:

   \doifmode{*register}

>3. In the recent beta, which I downloaded on 11 May, \completeindex
>    generates an erroneous ToC entry, viz. titleindex. I traced this
>    back to an \xdef that does not do what it probably was meant to do:

hm, here the toc entry has: \headtext {\v!title}

so, you probably have turned toc-expansion on,

in lang-lab, you can change the def :

\unexpanded\def\headtext
   {\let\handletextprefix\firstoftwoarguments
    \dogetupsometextprefix\headlanguage\c!titel}

(so, add \unexpanded; i'll add it too, since it does not harm compatibility)

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-21 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-21 19:35 Indexes Simon Pepping
2002-05-21 21:21 ` Indexes Hans Hagen

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).