13

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.

lockstep
  • 250,273

1 Answers1

12

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.

egreg
  • 1,121,712
  • 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
  • 1
    They are used by makeindex, AFAIR they refer to the three possible indexing levels – daleif Aug 19 '14 at 15:22
  • 1
    @user153012 The .mst file is used just by makeindex. – egreg Aug 19 '14 at 15:23
  • 1
    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
  • 3
    @user153012 "\\hspace{2em}" or "\\qquad" will be accepted (escaping the backslash is sufficient). – egreg Aug 19 '14 at 15:45
  • @egreg Your answer is useful for me, when I use the command delim_0 "\\textarabic{،}\\qquad" in an arabic polyglossia environment, and I obtain the good arabic comma after the words of the index. But for the multiple entries, the commas between the numbers of the pages' entries are still the latin commas. What's the command for these commas, between the pages' number ? – Faouzi Bellalouna Jun 12 '20 at 13:25
  • @FaouziBellalouna This requires a new question with all the needed details. – egreg Jun 12 '20 at 13:33
  • Would you see this question opened now. Thank you – Faouzi Bellalouna Jun 12 '20 at 14:42
  • https://tex.stackexchange.com/questions/549091/index-and-comma-in-arabic-environment – Faouzi Bellalouna Jun 12 '20 at 16:18