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.

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

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
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
show 3 more comments

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.