At 04:08 PM 4/6/2002 +1000, Daniel Pittman wrote:
>The only way I could find that actually worked was, in a minimal
>example:
>
>\def\MyTitle{Mango Bread} \def\MyCategory{Bread}
>\edef\LocalDoIndex{\noexpand\index{\MyCategory+\MyTitle}}
>\LocalDoIndex
>
>I can obviously pretty that up a little by wrapping it into a
>'ExpandedIndex' macro or such that will do the expansion, etc, and write
>the final index note.
>
>Is there a better way of achieving this result, though?
\starttext
\setupregister[index][expansion=yes]
\def\test{\bf test}
test\index{\test}
\stoptext
so,
in that case \index{\MyCategory+\MyTitle}
will be expanded
[expansion=yes] expands the index entry, but leaves macros defined as
\unexpanded\def\... untouched, so most of the context commands will be
passed as commands
[expansion=command] is another option, this gives a one level expansion
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
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
-------------------------------------------------------------------------
fall-back web server:
www.pragma-ade.nl
-------------------------------------------------------------------------