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:
Code: Select all
\documentclass[11pt,a4paper,twoside]{report}
\usepackage{datatool}
\usepackage[hyperfirst=false,nowarn,nomain,acronym,nonumberlist,toc,shortcuts]{glossaries}
\newglossary[slg]{symbols}{sym}{sbl}{List of Symbols}
\newglossaryentry{Symbol1}{type=symbols,name=sym},
symbol=,
description=random symbol}
\makeglossaries
\begin{document}
%Redefining the page numbering for chapters
\renewcommand{\thepage}{\arabic{chapter}-\arabic{page}}
\let\oldchapter=\chapter
\def\resetpage{\setcounter{page}{1}}
\def\chapter{\expandafter\resetpage\oldchapter}
\chapter{Chapter 1}
%The list of symbol is empty...
\gls{Symbol1}
\printglossary[type=symbols]
\end{document}
Does anyone have a solution for this?
Thank you!