By running the code below I get this result:
but I want something like the following image. In other words I need to be able to have an extra extendeddiscription
option in the \newglossaryentry
command so that I can add a "Extended description" to some of my entries. How can I do that?
\documentclass[a4paper]{book}
\usepackage{lipsum}
\usepackage[xindy,nonumberlist,toc]{glossaries}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
%\renewcommand{\glossarymark}[1]{\markboth{#1}{#1}}
\newglossarystyle{mylist}{%
\glossarystyle{treegroup}
\renewenvironment{theglossary}%
{\setlength{\parindent}{0pt}%
\setlength{\parskip}{0pt}
}%
{}%
\renewcommand*{\glossaryheader}{}%
\renewcommand*{\glsgroupheading}[1]{\noindent\textbf{\glsgetgrouptitle{##1}}\par\nopagebreak}
\renewcommand{\glossaryentryfield}[5]{%
\hangindent0pt\relax
\parindent0pt\relax
\glsentryitem{##1}\glstarget{##1}{##2}%
{\dotfill}\ifx\relax##4\relax
\else
\space(##4)%
\fi
\space ##3\glspostdescription \space ##5\par}%
\renewcommand{\glossarysubentryfield}[6]{%
% \hangindent##1\glstreeindent\relax
\parindent##1\glstreeindent\relax
\ifnum##1=1\relax
\glssubentryitem{##2}%
\fi
\glstarget{##2}{##3}%
\ifx\relax##5\relax
\else
\space(##5)%
\fi
{\dotfill}
##4\indent\glspostdescription\space##6\par}%
\renewcommand*{\glsgroupskip}{\indexspace}
\renewcommand*{\glspostdescription}{}
}
\makeatother
\setlength{\glstreeindent}{20pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newglossaryentry{latinalph}
{
name={Alfabeto latino},
description={Latin Alphabet},
}
\newglossaryentry{exlatinalph}
{
name={Esteso alfabeto latino},
description={Extended Latin Alphabet},
parent={latinalph}
%extendeddescription={\lipsum[1]}
}
\newglossaryentry{set}
{
name={Impostato},
description={Set},
parent={latinalph}
}
\newglossaryentry{diamatrix}
{
name={Matrice diagonale},
description={Diagonal matrix},
%extendeddescription={\lipsum[2]}
}
\makeglossaries
\glossarystyle{mylist}
\begin{document}
In this chapter we introduce \gls{latinalph}, \gls{exlatinalph},\gls{set}, and \gls{diamatrix}.
\printglossary[title=Glossario]
\end{document}