% arara: pdflatex
% arara: makeglossaries if found("aux", "@istfilename")
% arara: pdflatex if found ("log", "Rerun") || found("aux", "@istfilename")
\documentclass{article}

\usepackage{glossaries-extra}

\makeglossaries

\setabbreviationstyle[acronym]{short-postfootnote}
\newacronym{sample2}{short2}{long2}

\setabbreviationstyle{long-em-short-em}
\newabbreviation{sample1}{short1}{long1}


\begin{document}
First use: \gls{sample2}, \gls{sample1}.

Next use: \gls{sample2}, \gls{sample1}.

\printglossaries

\end{document}
