# Is there an easy way to hide comma (,) from the end of the indexed words?

I use

\usepackage{makeidx}
\makeindex


and then I index a word as \index{word}. After \printindex in the Index it is appear as

word, 1

and I want it to appear as

word 1

But I don't know how to make it.

-

Prepare a file <main>.mst, where <main> stands for the name of your main TeX file, containing

delim_0 " "
delim_1 " "
delim_2 " "


and save it in the same folder containing your main file. For instance, if you have thesis.tex, you should name the new file as thesis.mst.

Then running makeindex will load the file and commas will be removed.

-
Thanks, and these operators, I mean delim_0, delim_1, delim_2 are just used by makeindex, or by anything else? Will it change other things in my doc? – user153012 Aug 19 '14 at 15:21
They are used by makeindex, AFAIR they refer to the three possible indexing levels – daleif Aug 19 '14 at 15:22
@user153012 The .mst file is used just by makeindex. – egreg Aug 19 '14 at 15:23
Really thanks! I have one more question. I think this mst file doesn't know LaTeX codes, so, can I make a little bit more space there then one " " space? – user153012 Aug 19 '14 at 15:27
@user153012 "\\hspace{2em}" or "\\qquad" will be accepted (escaping the backslash is sufficient). – egreg Aug 19 '14 at 15:45