% This file is embedded in glossaries-extra-manual.pdf
% Example 1 Multiple abbreviation styles
% Label: "ex:multiabbrvstyles"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[T1]{fontenc}
\usepackage{glossaries-extra}
\setabbreviationstyle{long-short-sc}
\setabbreviationstyle[genus]{long-only-short-only}
\setabbreviationstyle[common]{short-nolong}
\newabbreviation{xml}{xml}{extensible markup language}
\newabbreviation[category={genus}]{clostridium}{C.}{Clostridium}
\newabbreviation[category={genus}]{myristica}{M.}{Myristica}
\newabbreviation[category={common}]{html}{HTML}{hypertext markup language} \newabbreviation[category={title}]{dr}{Dr}{Doctor} 
\begin{document}
First use: \gls{xml}, \gls{clostridium}, \gls{myristica}, \gls{html}, \gls{dr}. 

Next use: \gls{xml}, \gls{clostridium}, \gls{myristica}, \gls{html}, \gls{dr}. 
\end{document}
