How to combine Acronym and Glossary

a simple example

\documentclass{article}

\usepackage[acronym]{glossaries}
\makeglossaries

%from documentation
%\newacronym[⟨key-val list⟩]{⟨label ⟩}{⟨abbrv ⟩}{⟨long⟩}
%above is short version of this
% \newglossaryentry{⟨label ⟩}{type=\acronymtype,
% name={⟨abbrv ⟩},
% description={⟨long⟩},
% text={⟨abbrv ⟩},
% first={⟨long⟩ (⟨abbrv ⟩)},
% plural={⟨abbrv ⟩\glspluralsuffix},
% firstplural={⟨long⟩\glspluralsuffix\space (⟨abbrv ⟩\glspluralsuffix)},
% ⟨key-val list⟩}

\newacronym{cd}{CD}{compact disk}


\begin{document}
\noindent
First use \gls{cd}\\
subsequent \gls{cd}

\printglossaries

\end{document}

alt text

glossaries supports multiple nomenclatures so you can still use something like this

\newglossaryentry{tree}{name={tree},
description={trees are the better humans}}

and because in the above case the type is automatically set to 'main' it will give you a second list called 'Nomenclature'

\documentclass{article}

\usepackage[acronym]{glossaries}
\makeglossaries

%from documentation
%\newacronym[⟨key-val list⟩]{⟨label ⟩}{⟨abbrv ⟩}{⟨long⟩}
%above is short version of this
% \newglossaryentry{⟨label ⟩}{type=\acronymtype,
% name={⟨abbrv ⟩},
% description={⟨long⟩},
% text={⟨abbrv ⟩},
% first={⟨long⟩ (⟨abbrv ⟩)},
% plural={⟨abbrv ⟩\glspluralsuffix},
% firstplural={⟨long⟩\glspluralsuffix\space (⟨abbrv ⟩\glspluralsuffix)},
% ⟨key-val list⟩}

\newacronym{cd}{CD}{compact disk}

\newglossaryentry{tree}{name={tree},
    description={trees are the better humans}}

\begin{document}
\noindent
First use \gls{cd}\\
subsequent \gls{cd}

Nomenclature \gls{tree}

\printglossaries

\end{document}

alt text

To finally get what you are after, you could use

\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}
\makeglossaries

%from documentation
%\newacronym[⟨key-val list⟩]{⟨label ⟩}{⟨abbrv ⟩}{⟨long⟩}
%above is short version of this
% \newglossaryentry{⟨label ⟩}{type=\acronymtype,
% name={⟨abbrv ⟩},
% description={⟨long⟩},
% text={⟨abbrv ⟩},
% first={⟨long⟩ (⟨abbrv ⟩)},
% plural={⟨abbrv ⟩\glspluralsuffix},
% firstplural={⟨long⟩\glspluralsuffix\space (⟨abbrv ⟩\glspluralsuffix)},
% ⟨key-val list⟩}

%\newacronym{api}{API}{Application Programming Interface }

%%% The glossary entry the acronym links to   
\newglossaryentry{apig}{name={API},
    description={An Application Programming Interface (API) is a particular set
of rules and specifications that a software program can follow to access and
make use of the services and resources provided by another particular software
program that implements that API}}

%%% define the acronym and use the see= option
\newglossaryentry{api}{type=\acronymtype, name={API}, description={Application
Programming Interface}, first={Application
Programming Interface (API)\glsadd{apig}}, see=[Glossary:]{apig}}
\begin{document}
\noindent
First use \gls{api}\\
subsequent \gls{api}
\newpage

\printglossary[type=\acronymtype]
%%% \newpage just to demonstrate that links are correct
\newpage
\printglossary[type=main]

\end{document}

alt text


My solution looks like that:

\newglossaryentry{api}
{
    name={API},
    description={An Application Programming Interface (API) is a particular set
            of rules and specifications that a software program can follow to access and make use of the services and resources provided by another particular software program that implements that API},
    first={Application Programming Interface (API)},
    long={Application Programming Interface}
}

So I don't have to split it into two parts, one for the glossary and one for the acronym section. Imho a clean solution.

Cheers :-)

Edit: But if you really want to split into two sections, then OSHis solution is perfect.


I have extended this very very nice example (thanks at this place ;) ) thourgh which it is not necessary any more to add the glossary entry manually:

\newglossaryentry{APIG}{
name=\glslink{API}{Application Programming Interface (\gls{API})},
description={
Application Programming Interface Desc}
}

\newglossaryentry{API}{
type=\acronymtype,
name=API,
first=Application Programming Interface (API),
firstplural={Application Programming Interfaces (API's)},
see=[Glossary:]{\gls{APIG}}, 
description=\glslink{APIG}{Application Programming Interfaces}
}

The main key is \glslink{APIG}{Application Programming Interfaces}. Everytime the (API) acronym is added it "adds" the glossary entry.

Tags:

Glossaries