LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronymsglossaries | Problem with non-standard Page Numbering Topic is solved

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Posts: 5
Joined: Fri Feb 01, 2013 5:31 pm

glossaries | Problem with non-standard Page Numbering

Postby toms125 » Fri Feb 01, 2013 6:07 pm


I am using the glossaries package in my report document using TeXworks.

I have created a new glossary "List of Symbols" that I am trying to display inside chapters with \printglossaries. If I use a classic page numbering like roman or arabic, the "List of Symbols" will contain all the symbols that are used with the command \gls{} or added with \glsadd{} or \glsaddall{}, which is fine.

However, when I redefine the page numbering to have chapter-page, the commands listed above don't add anymore the symbols to the "List of Symbols", which is therefore empty. The symbols are added only if the commands like \gls{} are used before redefining the page numbering.

Here is a minimal example of my code:
  1. \documentclass[11pt,a4paper,twoside]{report}
  2. \usepackage{datatool}
  3. \usepackage[hyperfirst=false,nowarn,nomain,acronym,nonumberlist,toc,shortcuts]{glossaries}
  5. \newglossary[slg]{symbols}{sym}{sbl}{List of Symbols}
  6. \newglossaryentry{Symbol1}{type=symbols,name=sym},
  7. symbol=,
  8. description=random symbol}
  9. \makeglossaries
  11. \begin{document}
  13. %Redefining the page numbering for chapters
  14. \renewcommand{\thepage}{\arabic{chapter}-\arabic{page}}
  15. \let\oldchapter=\chapter
  16. \def\resetpage{\setcounter{page}{1}}
  17. \def\chapter{\expandafter\resetpage\oldchapter}
  19. \chapter{Chapter 1}
  20. %The list of symbol is empty...
  21. \gls{Symbol1}
  22. \printglossary[type=symbols]
  24. \end{document}

If I don't redefine the page numbering for chapters, the symbol is printed in the "List of Symbols" but with this code it is not.

Does anyone have a solution for this?

Thank you!

User avatar
Posts: 264
Joined: Thu Nov 06, 2008 11:15 am

Postby nlct » Sun Feb 03, 2013 7:07 pm

You need to change the page compositor to - (hyphen), since your locations are hyphen-separated numbers:
  1. \glsSetCompositor{-}

This must come before \makeglossaries. (You have to set the compositor even if you've used the nonumberlist option.)

Nicola Talbot

Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 1 guest