# [NTG-context] Formatting Indexed Words Within the Text

Malte Stien malte at stien.de
Sat Mar 24 05:19:42 CET 2012

Hi,

I got a few responses for this. Thank you to all of you. I ended up using the code below. Works a treat. And yes, apologies. The square brackets were a typo; of course they should have been curly.

Thank you again.
Malte.

On 24/03/2012, at 0:01, ntg-context-request at ntg.nl wrote:

> 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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9184069037437439, "perplexity": 2726.608721305452}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-18/segments/1429246659449.65/warc/CC-MAIN-20150417045739-00124-ip-10-235-10-82.ec2.internal.warc.gz"}