# Changing the style of index levels

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?

-
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

Since the output of makeindex is something like

\item \BRbooktitlestyle {\BRbookof Daniel}


it should be sufficient to say

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


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