How to produce multiple lists of acronyms

I use the glossaries package to produce a list of acronyms and also a glossary of gene names that I want to keep separated from other abbreviations.

I use e.g. \newacronym{SNP}{SNP}{single nucleotide polymorphism} to create acronyms and something like \newglossaryentry{ApoE}{type=gene,name=ApoE, description={apolipoprotein E}} to define genes. This allows me to print the list of acronyms and the list of genes separately using

\printglossary[type=\acronymtype,title={List of Abbreviations},style=myglossarystyle]


and

\printglossary[type=gene, title={List of Genes},style=myglossarystyle],


respectively.

When I first use an acronym it prints single nucleotide polymorphism (SNP), however this doesn't work for the gene glossary. So the question is if I can make the glossary to act like a second list of acronyms.

How's this:

\documentclass{article}
\usepackage{glossaries}
\DefineAcronymSynonyms
\DeclareAcronymList{main}
\DeclareAcronymList{gene}
\newglossary{gene}{genin}{genout}{Index of Genes}
\newcommand{\newgene}[4][]{%
\bgroup
\def\acronymtype{gene}%
\newacronym[#1]{#2}{#3}{#4}%
\egroup
}%

\newacronym{SNP}{SNP}{single nucleotide polymorphism}
\newacronym{SNPa}{SNPa}{single nucleotide polymorphism}
\newgene{ApoE}{ApoE}{apolipoprotein E}
\makeglossaries
\begin{document}

\gls{SNP}

\gls{SNP}

\gls{ApoE}

\gls{ApoE}

\acf{ApoE}

\printglossaries
\end{document}

• Thanks that works nicely, but comes with the disadvantage that it doesn't support the additional features of acronyms (like \acf, \acs...). Is there a way to support these as well? Dec 5 '16 at 14:50
• I redid it, does it do what you want now? Dec 6 '16 at 3:05
• It would be simpler just to define \newgene as \newacronym[type=gene,#1]{#2}{#3}{#4} rather than redefining \acronymtype. Dec 6 '16 at 9:34
• @NicolaTalbot I guess I didn't read the documentation carefully enough, thanks. (The solution I had before was even more overcomplicated). Dec 6 '16 at 14:24