% This file is public domain
% If you want to use arara, you need the following directives:
% arara: pdflatex: { synctex: on }
% arara: makeglossaries
% arara: pdflatex: { synctex: on }
%
%http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sample-dual
\documentclass{article}

\usepackage[acronym]{glossaries}

\makeglossaries

% \newdualentry[main options]{label}{short}{long}{description}

\newcommand*{\newdualentry}[5][]{%
  % main entry:
  \newglossaryentry{main-#2}{name={#4},%
  text={#3\glsadd{#2}},%
  description={#5},%
  #1% additional options for main entry
  }%
  % abbreviation:
  \newacronym{#2}{#3\glsadd{main-#2}}{#4}%
}

\newdualentry{svm}% label
  {SVM}% abbreviation
  {support vector machine}% long form
  {Statistical pattern recognition technique}% description

\begin{document}

\gls{svm}.

\printglossaries
\end{document}
