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 would like to change the style of the levels in an index. For example, let's say I have an index like:

Foo
    bar, 1
    barbar, 2
Bar
    foo, 5

and I would like the first level to be emphasized ("Foo" and "Bar"). I'm already using imakeidx for this document. How could I achive this?

share|improve this question
    
You may use the key othercode in \indexsetup to change the definition of \item, but it's necessary to know how the .ind file is structured. –  egreg May 28 '11 at 20:20
    
@egreg: do you have an example? –  ℝaphink May 29 '11 at 6:31
add comment

1 Answer

up vote 2 down vote accepted

Since the output of makeindex is something like

\item \BRbooktitlestyle {\BRbookof Daniel}

it should be sufficient to say

\renewcommand*{\BRbooktitlestyle}[1]{\textbf{#1}}

in your preamble

share|improve this answer
    
In the preamble in the .ist right? –  ℝaphink May 29 '11 at 12:15
    
I'm actually using it just before calling \printindex and it works fine. –  ℝaphink May 29 '11 at 13:58
    
That works for books. At first level, I have "Old Testament" and "New Testament" entries, defined implicitely because I use things like \biblerefmap{Gn}{1@Ancien Testament!01}. Is there a way I can also change the style for these implicit entries? –  ℝaphink May 29 '11 at 14:01
    
@Raphink Without a minimal example it's really impossible to help. The redefinition of \BRbooktitlestyle should go in the document's preamble, but before \printindex is good as well. –  egreg May 29 '11 at 18:17
add comment

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.