# package makeidx: print first letter for each group of keys

I've created index with makeidx package. It works. What really need is to print the first letter above every group of keys (i.e. referring to the image I want to print the red letter, that I have manually inserted).

-

According to How to create capital letter for index you would require the following in a file test.ist (or test.mst*):

headings_flag 1


Then when you run makeindex, you need to use the -s option to specify this style file (assuming your document is called test.tex):

makeindex -s test.ist test.idx


The first flag set allows for the creation of the header (a letter). The second prefix and third suffix flag wraps the header contents to obtain the appropriate formatting ({\textsf{\color{red}...} in this case).

* According to makeindex man page, "If exactly one input file was given and no explicit style file was specified using -s, makeindex uses a file with the extension .mst as default style file (when present)."

-
or save as mst file. –  Marco Daniel May 1 '12 at 18:15
I suggest to change the last .ist line to heading_suffix "}\\nopagebreak\n". –  lockstep May 1 '12 at 18:17
@lockstep: Good suggestion - didn't think about page breaking! –  Werner May 1 '12 at 18:23
@Mariano: That's the reason why you should use mst –  Marco Daniel May 1 '12 at 18:30
@Mariano: According to makeindex man page, "If exactly one input file was given and no explicit style file was specified using -s, makeindex uses a file with the extension .mst as default style file (when present)." –  Werner May 1 '12 at 18:34