2

I'm having an issue using the hierarchal categories feature for the glossaries package. What i'm trying to do is add various entries under the "Greek Letters" parent. First, without adding the parent option to a glossary entry I get the following:

enter image description here

So far, so good. Now, if I add the parent option to the delta and pi glossary entries I get the following:

enter image description here

As you can see, the entries are combined into one instead of on three lines with "Greek letters" entry first.

Here is the code to produce the two cases:

%% no parent option
\documentclass[12pt,letterpaper]{report}
\usepackage[nonumberlist,toc,nopostdot]{glossaries} % load after hyperref
\makenoidxglossaries
\newglossaryentry{greekletter}{name={Greek letters},description={\glspar}}
\newglossaryentry{pi}
{
  name={\ensuremath{\pi}},
  sort={pi},
  description={ratio of the circumference of a circle to the diameter}
}
\newglossaryentry{delta}
{
  name={\ensuremath{\delta}},
  sort={delta},
  description={change in ...}
}

\begin{document}
  \glsaddall
  \printnoidxglossary
\end{document}

%% parent option
\documentclass[12pt,letterpaper]{report}
\usepackage[nonumberlist,toc,nopostdot]{glossaries} % load after hyperref
\makenoidxglossaries
\newglossaryentry{greekletter}{name={Greek letters},description={\glspar}}
\newglossaryentry{pi}
{
  name={\ensuremath{\pi}},
  sort={pi},
  description={ratio of the circumference of a circle to the diameter},
  parent=greekletter
}
\newglossaryentry{delta}
{
  name={\ensuremath{\delta}},
  sort={delta},
  description={change in ...},
  parent=greekletter
}

\begin{document}
  \glsaddall
  \printnoidxglossary
\end{document}
1
  • 2
    You need to use a style that supports hierarchical entries, such as one of the tree styles. – Nicola Talbot Jul 10 '14 at 21:14
3

You need to use a style that supports hierarchical entries, such as one of the tree or index styles. (See the table in the Predefined Styles section of the glossaries user guide. Choose one that doesn't have a check mark in the "Homograph" column.)

\documentclass[12pt,letterpaper]{report}

\usepackage[nonumberlist,toc,nopostdot,style=tree]{glossaries}

\makenoidxglossaries

\newglossaryentry{greekletter}{name={Greek
letters},description={\glspar}}
\newglossaryentry{pi}
{
  name={\ensuremath{\pi}},
  sort={pi},
  description={ratio of the circumference of a circle to the
diameter},
  parent=greekletter
}
\newglossaryentry{delta}
{
  name={\ensuremath{\delta}},
  sort={delta},
  description={change in ...},
  parent=greekletter
}


\begin{document}
  Test.

  \glsaddall
  \printnoidxglossary
\end{document}

This produces:

Image of glossary

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.