9

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).

enter image description here

11

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
heading_prefix "\\textsf\{\\color\{red\}"
heading_suffix "\}\\nopagebreak\n"

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
  • 1
    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
  • 1
    @Mariano: That's the reason why you should use mst – Marco Daniel May 1 '12 at 18:30
  • 2
    @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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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