Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 ?

share|improve this question
    
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. –  Thorsten Donig Nov 29 '13 at 17:00
    
@ Thorsten Donig I have replaced 'MakeIndex' by 'Xindy' but shows an erros : undefined control sequence\Xindy –  Soumitra Sen Nov 29 '13 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. –  Thorsten Donig Nov 29 '13 at 17:41
    
take a look at this: package makeidx: print first letter for each group of keys –  barbara beeton Nov 29 '13 at 22:01

2 Answers 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"
share|improve this answer
    
1 error occurs with this as follows : `imakeidx.sty' not found.\makeindex –  Soumitra Sen Nov 29 '13 at 17:18

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

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.