1

I want to use two glossaries, one for acronyms and one for a list of symbols. In the preamble I load the glossaries package with acronym and xindy options: \usepackage[nomain,acronym,xindy,toc]{glossaries}, and make the new glossary \newglossary[nlg]{notation}{not}{ntn}{Notation}.

My acronyms and symbols are all defined in a dedicated file, loaded using \loadglsentries{Glossaire}. References are collected (by xindy) using makeglossaries -d build main (the -d option because I compile into a sub-directory using pdflatex -output-directory=build).

In my document I use the \gls command, in the MWE I use \glsaddall with the same result: only first symbol is printed in the notation glossary.

Here is the MWE:

\documentclass[a4paper, 12pt, twoside]{report}
\usepackage[nomain,acronym,xindy,toc]{glossaries}
  \newglossary[nlg]{notation}{not}{ntn}{Notation}
  \loadglsentries{Glossaire}
  \makeglossaries

\begin{document}
  \glsaddall
  \printglossary[type=\acronymtype , title={Liste des acronymes}, toctitle={Liste des acronymes}]
  \printglossary[type=notation,title={Liste des symboles}, toctitle={Liste des symboles}]

\end{document}

And the definitions:

\newacronym{ac1}{AC1}{not an ACronym, but still first one}
\newacronym{ac2}{AC2}{not an ACronym, second one}

\newglossaryentry{indice r}{
  type=notation,
  name={indice ${}_r$},
  symbol={\ensuremath{a_r}},
  description={L'indice ${}_r$ blabla},
  sort={alpha}%
}
\newglossaryentry{intervalle}{
  type=notation,
  name={intervalle $[{a}{b}]$},
  symbol={\ensuremath{[{a}{b}]}},
  description={blabla $a$ and $b$},
  sort={alpha}%
}

Beside the providecommands, the not file has only one entry too:

\begin{theglossary}\glossaryheader
\glsgroupheading{A}\relax\glsresetentrylist
\glossentry{indice r}{\glossaryentrynumbers{\relax 
\glsXpageXglsnumberformat{}{1}}}%
\end{theglossary}\glossarypostamble

Any ideas or obvious stuff I missed?

1

You are using xindy and use the same sort key for both entries. Hence, they are treated as a single entry and only one ends up in the final glossary. See the large red box on page 76 of the package manual. To avoid this, give them distinct sort keys (or use a different method to sort and produce the glossary).

For example:

\begin{filecontents}{a.tex}
  \newacronym{ac1}{AC1}{not an ACronym, but still first one}
  \newacronym{ac2}{AC2}{not an ACronym, second one}

  \newglossaryentry{indice r}{
    type=notation,
    name={indice ${}_r$},
    symbol={\ensuremath{a_r}},
    description={L'indice ${}_r$ blabla},
    sort={alpha1}%
  }
  \newglossaryentry{intervalle}{
    type=notation,
    name={intervalle $[{a}{b}]$},
    symbol={\ensuremath{[{a}{b}]}},
    description={blabla $a$ and $b$},
    sort={alpha2}%
  }
\end{filecontents}
\documentclass[a4paper, 12pt, twoside]{report}
\usepackage[nomain,acronym,xindy,toc]{glossaries}
\newglossary[nlg]{notation}{not}{ntn}{Notation}
\loadglsentries{a}
\makeglossaries

\begin{document}
  \glsaddall
  \printglossary[type=\acronymtype, title={Liste des acronymes}, toctitle={Liste des acronymes}]
  \printglossary[type=notation,title={Liste des symboles}, toctitle={Liste des symboles}]

\end{document}

double entry

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.