5

Consider the following example :

\documentclass{article}
\usepackage{makeidx,multicol}
\makeindex
\begin{document}
All\index{All},Apple\index{Apple}, Ball\index{Ball}, , Small\index{Small},     Zoo\index{Zoo}

 \printindex

\end{document}

Produces :
enter image description here

But I want like this :
enter image description here

I use kile in ubuntu10.04. How can I do my job ?

Soumitra Sen
  • 2,995

2 Answers2

2

Try

\documentclass{article}
\usepackage[makeindex]{imakeidx}
\makeindex[options=-s lou3.ist]
\usepackage{multicol}
\begin{document}
All\index{All},Apple\index{Apple}, Ball\index{Ball}, , Small\index{Small},     Zoo\index{Zoo}

 \printindex

\end{document}

and "lou3.ist" as a file in the same dir as your main file:

quote '+'
headings_flag 1
symhead_positive "Symbole"
numhead_positive "Zahlen"
heading_prefix "{\\bf "
heading_suffix "}\\nopagebreak%\n \\indexspace\\nopagebreak%"
delim_r "~--~"
suffix_2p "\\,f"
suffix_3p "\\,ff"
preamble
"\\markright{INDEX}\n\n\\begin{theindex}\n\\thispagestyle{headings}\n"
postamble "\n\n\\end{theindex}\n"
Louis
  • 633
2

You can use Xindy instead of MakeIndex to get the desired output. But first you have to set up your editor (Kile) for that. Go to menu Options → Configure Kile and in the tree on the left go to Tools → Build and then select MakeIndex. In the upper right corner choose Xindy from the drop down menu (see screen capture).

enter image description here

Note that my system is German and the names on your system for sure will differ. But this should give you the necessary orientation.

Now you can slightly modify your code example and prepare it for use with Xindy.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[xindy]{imakeidx}

\makeindex

\begin{document}
  All\index{All}, Apple\index{Apple}, Ball\index{Ball}, Small\index{Small}, Zoo\index{Zoo}

 \printindex
\end{document}

enter image description here

  • 1
    According to you I have configured kile with Xindy.After this an error also occurs for your given code. error is : " `imakeidx.sty' not found.^^M ". How can I fix this in my system ubuntu10.04 – Soumitra Sen Nov 29 '13 at 18:11
  • @SoumitraSen: Install that package subsequently by the package manager of your TeX distribution. Since you have a rather old Linux system, you probably need to install vanilla TeX Live 2013 and replace the TeX system from the repository of your Linux distribution. If for some reasons you don't manage to install »imakeidx«, you can continue using »makeidx«. – Thorsten Donig Nov 29 '13 at 18:55