1

Let's consider a (slightly modified) example from Differences between "xindy" and "makeindex":

\documentclass{article}
\usepackage{fontspec}
\usepackage[danish]{babel}
\usepackage[index,style=indexgroup,xindy]{glossaries}
\makeglossaries
\newterm{ænder}
\newterm{zebra}
\newterm{aardvark}
\newterm[parent=ænder]{gråand}
\begin{document}
\Gls[format=textbf]{ænder}
\Gls{zebra}
\newpage
\Gls{aardvark}
\Gls{zebra}
\newpage
\Gls{zebra}
\Gls{ænder}
\Gls{aardvark}
\Gls{gråand}
\printindex
\end{document}

We save the above code as test.tex, run xelatex test && xindy -I xindy -L danish -C utf8 -M "test" -t "test.ilg" -o "test.ind" "test.idx" && xelatex test and get a fully bold index:

output

How to keep the headings bold but not the entries? In the example, we want normalfont "zebra", "ænder", "gråand", and "aardvark" on the last page instead of bold-faced entries. The headings "Indeks", "Z", "Æ", and "Å" should still be bold. Needless to say, we prefer a possibly clear, simple and automatic solution ;-).

1 Answers1

1

I have checked in the log file and found that the bold font originates from the macro \glstreenamefmt, so to get rid of it we redefine

\renewcommand\glstreenamefmt[1]{#1}

Unfortunately, then the headings also lose the boldness, but we can put it back in using

\renewcommand\glstreegroupheaderfmt[1]{\textbf{#1}}

Full example:

\documentclass{article}
\usepackage{fontspec}
\usepackage[danish]{babel}
\usepackage[index,style=indexgroup,xindy]{glossaries}
\renewcommand\glstreenamefmt[1]{#1}
\renewcommand\glstreegroupheaderfmt[1]{\textbf{#1}}
\makeglossaries
\newterm{ænder}
\newterm{zebra}
\newterm{aardvark}
\newterm[parent=ænder]{gråand}
\begin{document}
\Gls[format=textbf]{ænder}
\Gls{zebra}
\newpage
\Gls{aardvark}
\Gls{zebra}
\newpage
\Gls{zebra}
\Gls{ænder}
\Gls{aardvark}
\Gls{gråand}
\printindex
\end{document}

enter image description here

Henri Menke
  • 109,596