I use some glossaries, one in the main matter of my text, other in the back matter of my document. I applied to the first a homemade style with hierarchical entries & subentries (cf. MWE). I would trait differently both glossaries, but I'm exposed to the following difficulties:
When I decided to set a configuration in the announcement of the package, I don't know how to change. I want \usepackage[numberedsection=autolabel]{glossaries} for the first glossary, \usepackage[section,numberedsection=nameref]{glossaries} for the other.
Secondly, I want to number my hierarchical sub-entries like sections, subsections or subsubsections, and appear in toc and headings. But, if I try my own glossary style with an unstarred sectioning, compilation doesn't work.
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = arara
\documentclass{scrbook}
\usepackage[xindy={language=french, codepage=utf8}]{glossaries}
\newglossary*{his}{History}
\newglossary*{est}{Esthetic}
\makeglossaries
\newglossarystyle{arbre}{%
\renewenvironment{theglossary}{\tablehead{}\begin{description}}{\end{description}\tabletail{}}%
\renewcommand{\glossaryheader}{}%
\renewcommand*{\glsgroupskip}{}%
\renewcommand*{\glossentry}[2]{\section*{\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}}}}% I want unscarred this \section
\renewcommand{\subglossentry}[3]{%
\ifnum##1=1\relax\subsection*{\glssubentryitem{##2}\glstarget{##2}{\glossentryname{##2}}}\fi% idem
\ifnum##1=2\relax\subsubsection*{\glssubentryitem{##2}\glstarget{##2}{\glossentryname{##2}}}\fi% idem
\ifnum##1=3\relax\item[\glssubentryitem{##2}\glstarget{##2}{\glossentryname{##2}}] \space\glossentrydesc{##2}\glspostdescription\space ##3\fi}}
\newglossaryentry{section}{type=est,name=section,description={\nopostdesc}}
\newglossaryentry{subsection}{type=est,name=subsection,parent=section,description={\nopostdesc}}
\newglossaryentry{subsubsection}{type=est,name=subsubsection,parent=subsection,description={\nopostdesc}}
\newglossaryentry{glouglou}{type=est,name=glouglou,parent=subsubsection,description={dindon}}
\newglossaryentry{coincoin}{type=his,name=coincoin,description={canard}}
\newcommand\est[5]{
\newglossaryentry{#1}{type=est,name=#1,description={\nopostdesc}}%
\newglossaryentry{#2}{type=est,name=#2,parent=#1,description={\nopostdesc}}%
\newglossaryentry{#3}{type=est,name=#3,parent=#2,description={\nopostdesc}}%
\newglossaryentry{#4}{type=est,name=#4,parent=#3,description={#5}}%
\gls{#4}, #5}%
\begin{document}
\est{section}{subsection}{subsubsection}{coco}{ara}, \gls{coincoin}, \gls{glouglou}.
\printglossary[type=est,style=arbre]
% and now usepackage[section,numberedsection=nameref]{glossaries}
\printglossary[type=his]
\end{document}
% arara: xelatex
% arara: makeglossaries
% arara: xelatex
Thanks for your help. (This question is the continuation of Glossaries with more hierarchical categories)
\section, not for\subsectionor\subsubsection. I still try tomorrow. – Zouib Jul 01 '16 at 23:58\subglossentry. I've updated my answer. – Nicola Talbot Jul 02 '16 at 08:38