% This file is embedded in glossaries-extra-manual.pdf 
% Example 129 Multi-entries: separators
% Label: "ex:multientrysep"
% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[colorlinks]{hyperref}
\usepackage[stylemods=bookindex,style=bookindex]{glossaries-extra} 

\makeglossaries 

\newcommand{\latinname}[1]{\emph{#1}}
\glssetcategoriesattributes
 {genus,species}{textformat,glossnamefont}{latinname}
\glssetcategoriesattributes{species}{discardperiod,retainfirstuseperiod}{true}


% multi-entry category attributes:
\glssetcategoryattribute{genus}{combinedfirstsepfirst}{\space}
\glssetcategoryattribute{genus}{combinedfirstsep}{\space}
\glssetcategoryattribute{genus}{combinedsepfirst}{~}
\glssetcategoryattribute{genus}{combinedsep}{\relax}


\setabbreviationstyle[genus]{long-only-short-only-desc}
\newabbreviation
 [category={genus},description={}]
 {clostridium}{C.}{Clostridium} 

\setabbreviationstyle[species]{long-only-short-only-desc}


\newabbreviation[category={species},
 description={},parent={clostridium}]{botulinum}{bot.}{botulinum}
\newabbreviation[category={species},
 description={},parent={clostridium}]{perfringens}{per.}{perfringens}
\newabbreviation[category={species},
 description={},parent={clostridium}]{tetani}{tet.}{tetani}


\multiglossaryentry{cbot}{clostridium,botulinum}
\multiglossaryentry{cperf}{clostridium,perfringens}
\multiglossaryentry{ctet}{clostridium,tetani}


\multiglossaryentrysetup{indexothers=false,hyper=allmain} 
\begin{document}
First use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}.


Next use: \mgls{cbot}, \mgls{cperf}, \mgls{ctet}.
\printglossaries 
\end{document}
