Discussion:
Bold text + page number in the index, but how is it done please?
(too old to reply)
Sharon Kimble
2015-03-06 23:32:53 UTC
Permalink
I've recently acquired the "LaTeX Beginners Guide" from
https://www.packtpub.com/packt/offers/free-learning/ and in the
index they have the first item in a group be both bold for the index
and also the page number. How is it done please? I can get the page
number bold, but not the item, and I'm intrigued to know how to do
it. I've googled for it but haven't found a solution that works.

Thanks
Sharon.
--
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.7, emacs 24.4.1.0
jon
2015-03-07 17:25:10 UTC
Permalink
Post by Sharon Kimble
I've recently acquired the "LaTeX Beginners Guide" from
https://www.packtpub.com/packt/offers/free-learning/ and in the
index they have the first item in a group be both bold for the index
and also the page number. How is it done please? I can get the page
number bold, but not the item, and I'm intrigued to know how to do
it. I've googled for it but haven't found a solution that works.
texdoc makeindex

then look at what the '@' is used for:

"Similarly, the command \index{gnu@{\bf gnu}} produces a boldface
gnu index entry" (p. 5).

of course, you can use latex commands instead.

cheers,
jon.
Peter Flynn
2015-03-07 20:27:26 UTC
Permalink
Post by Sharon Kimble
I've recently acquired the "LaTeX Beginners Guide" from
https://www.packtpub.com/packt/offers/free-learning/ and in the
index they have the first item in a group be both bold for the
index and also the page number. How is it done please? I can get
the page number bold, but not the item, and I'm intrigued to know
how to do it. I've googled for it but haven't found a solution that
works.
See
http://latex.silmaril.ie/formattinginformation/indexes.html#home

///Peter
Sharon Kimble
2015-03-08 19:24:39 UTC
Permalink
Post by Peter Flynn
Post by Sharon Kimble
I've recently acquired the "LaTeX Beginners Guide" from
https://www.packtpub.com/packt/offers/free-learning/ and in the
index they have the first item in a group be both bold for the
index and also the page number. How is it done please? I can get
the page number bold, but not the item, and I'm intrigued to know
how to do it. I've googled for it but haven't found a solution that
works.
See
http://latex.silmaril.ie/formattinginformation/indexes.html#home
///Peter
Thanks Peter, I didn't know of that site.

After a bit of experimentation, the answer is -

--8<---------------cut here---------------start------------->8---
\index{beer@\textbf{beer}|textbf}
--8<---------------cut here---------------end--------------->8---

Thanks
Sharon.
--
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.7, emacs 24.4.1.0
Loading...