The Texbook says:

The \write command is somewhht special, because its token list is first read without expansion; expansion occurs later, when the tokens are actually
being written to a file.

As \index writes to a file, this may be the problem!

I'll see if I can do any tricks with
where XXXX is delimiters to try and the name it out of the original text, as #1 macros seem to make it through fine...


Sam Liddicott wrote:
I'm trying to extend the indexing of newfangle literate code chunks.

I'm: \usepackage{index}

so that I can have multiple indexes; but the \index{} command seems to
literally interpret the first parameter, so that
indexes "\chunkname" instead of the name.

I've tried all kinds of use of \expandafter and other tricks with
secondary macros, like this:


But even then I get the literal text "\...@chunkname" as the indexed item.

The only thing that "nearly" works is if I pass #1 within \Chunk, but
then I get other text too, which I want to chop off.

Any clues on how to make the index package take an expression?


Reply via email to