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 ?

4
  • Use Xindy instead of MakeIndex. Xindy will give you an index with blocks for each letter and the letter itself as a kind of header. Nov 29, 2013 at 17:00
  • @ Thorsten Donig I have replaced 'MakeIndex' by 'Xindy' but shows an erros : undefined control sequence\Xindy Nov 29, 2013 at 17:11
  • I didn't tell you to replace \makeindex. You have to setup your editor for use with Xindy. Your code example will (almost) be left untouched. I provided an answer that might help. Nov 29, 2013 at 17:41
  • take a look at this: package makeidx: print first letter for each group of keys Nov 29, 2013 at 22:01

2 Answers 2

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"
1
  • 1 error occurs with this as follows : `imakeidx.sty' not found.\makeindex Nov 29, 2013 at 17:18
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

2
  • 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 Nov 29, 2013 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«. Nov 29, 2013 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .