[NTG-context] Formatting Indexed Words Within the Text

Rogers, Michael K mroge02 at emory.edu
Fri Mar 23 12:30:12 CET 2012


On Mar 23, 2012, at 6:57 AM, Malte Stien wrote:

> Is it possible to format indexed words in a particular style within the text more or less automatically. For example, if I write
>
>  There are some \index[ducks] in the zoo.
>
> ...I would like the term "ducks" to appear in small-capitals to indicate the that term can be found in the index. Ideally, I'd like to do that without explicit manual formatting. Is that possible?
>
> Thank you,
> Malte.

One way is to use your own macro:

\def\MyIndex#1{\index{#1}{\sc #1}}
\starttext
There are some \MyIndex{ducks} in the zoo.
\stoptext

By the way, your \index[ducks] didn't work for me the way I thought you wanted; I changed the [] to {} and added the word to the text body.  As far as I can tell, \index only adds entries to the index register and not to the text.

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).


More information about the ntg-context mailing list