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}
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}
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}
The see
key puts the cross-reference in the location list (this is how both makeindex
and xindy
behave), so if you suppress the location list (using the nonumberlist
option) this will also suppress the cross-reference. You can use the seeautonumberlist
package option (with nonumberlist
) to show the location list for just the entries that have the see
key, but you will still get the locations listed for those entries as well as the cross-reference.
Instead, I suggest you just put the cross-reference inside the description and suppress the location list with nonumberlist
:
\documentclass{scrreprt}
\usepackage[hidelinks]{hyperref}
\usepackage[toc,acronym,style=long]{glossaries}
\makeglossaries
%%%%%%%%%%%Glossary%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newglossaryentry{ctg}{name={CT},
description={A medical imaging technique to investigate the
anatomy using x-rays}}
%%% define the acronym
\newglossaryentry{ct}{type=\acronymtype,
name={CT},
description={Computed Tomography. \emph{Glossary:} \gls{ctg}},
first={Computed Tomography (CT)\glsadd{ctg}}}
\newglossaryentry{tomo}{name={Tomography},
description={Imaging by sections through an object}}
\begin{document}
blah blah \gls{ct} blah
\glsadd{tomo}
\printglossary[type=\acronymtype,nonumberlist]
\printglossary[type=main]
\end{document}
Best Answer
The
\makeglossaries
is necessary as well as\glsaddall
to show all defined acronyms.Compilation can be done with several methods, but the easiest way is (assuming the source file is called
foo.tex
)