| 1 |
% This file is public domain |
| 2 |
% If you want to use arara, you need the following directives: |
| 3 |
% arara: pdflatex: { synctex: on } |
| 4 |
% arara: makeglossaries |
| 5 |
% arara: pdflatex: { synctex: on } |
| 6 |
% |
| 7 |
%http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sample-dual |
| 8 |
\documentclass{article} |
| 9 |
|
| 10 |
\usepackage[acronym]{glossaries} |
| 11 |
|
| 12 |
\makeglossaries |
| 13 |
|
| 14 |
% \newdualentry[main options]{label}{short}{long}{description} |
| 15 |
|
| 16 |
\newcommand*{\newdualentry}[5][]{% |
| 17 |
% main entry: |
| 18 |
\newglossaryentry{main-#2}{name={#4},% |
| 19 |
text={#3\glsadd{#2}},% |
| 20 |
description={#5},% |
| 21 |
#1% additional options for main entry |
| 22 |
}% |
| 23 |
% abbreviation: |
| 24 |
\newacronym{#2}{#3\glsadd{main-#2}}{#4}% |
| 25 |
} |
| 26 |
|
| 27 |
\newdualentry{svm}% label |
| 28 |
{SVM}% abbreviation |
| 29 |
{support vector machine}% long form |
| 30 |
{Statistical pattern recognition technique}% description |
| 31 |
|
| 32 |
\begin{document} |
| 33 |
|
| 34 |
\gls{svm}. |
| 35 |
|
| 36 |
\printglossaries |
| 37 |
\end{document} |