indexing an emphasised word will \e{not} want it emphasised in the
index.
+(In fact, \e{no} emphasis in the text inside \c{\\i} will be
+preserved in the index. If you really want a term in the index to
+appear emphasised, you must say so explicitly using \c{\\IM}; see
+\k{input-index-rewrite}.)
+
Sometimes you might want to index a term which is not explicitly
mentioned, but which is highly relevant to the text and you think
that somebody looking up that term in the index might find it useful
indextag *t, *existing;
/*
+ * For an implicit merge, we want to remove all emphasis,
+ * because the chances are that the user didn't really want to
+ * index the term as emphasised.
+ */
+ {
+ word *w;
+
+ for (w = text; w; w = w->next) {
+ if (w->type == word_Emph)
+ w->type = word_Normal;
+ else if (w->type == word_EmphSpace)
+ w->type = word_WhiteSpace;
+ else if (w->type == word_EmphQuote)
+ w->type = word_Quote;
+ }
+ }
+
+ /*
* FIXME: want to warn on overlapping source sets.
*/
for (; *tags; tags = uadv(tags)) {