I am trying to add one main list of abbraviations and two subsection that contain other sub-lists of abbreviations with different titles in the frontmatter of my document, using the "acronym" from the glossaries
package, and having the titles appear in the table of content as "List of Abbreviations" (main title), "Time" (subsection), "Cities" (subsection).
Is there a way to split the acronyms in main and subsets with a a title each?
I can see that this is possible for example using the \newglossary
command if it is a glossary and then specifying the "type" when defining a new term for the glossary, but is there a similar function for acronyms?
I am also trying to slightly change the style of the two lists acronyms by for example adding \texttt
.
Thanks very much for any help, muuuuch appreciated!
\documentclass{article}
% Abbreviations
\usepackage[acronym,nonumberlist,toc]{glossaries}
%Remove the dot at the end of glossary descriptions
\renewcommand*{\glspostdescription}{}
\renewcommand*{\acronymname}{List of Abbreviations}
\renewcommand*\acronymname{Time}
\newacronym{utc}{UTC}{Coordinated Universal Time}
\newacronym{adt}{ADT}{Atlantic Daylight Time}
\renewcommand*\acronymname{Cities}
\newacronym{la}{LA}{Los Angeles}
\newacronym{ny}{NY}{New York}
\makeglossaries
\begin{document}
\frontmatter
\listoffigures % print list of figures
\listoftables % print list of tables
\printglossaries
\mainmatter
\chapter{Introduction}
% Use the acronyms
\gls{utc} is 3 hours behind \gls{adt}.
\gls{ny} is 3 hours ahead of \gls{la}.
\end{document}
I have something working OK, but I still cannot get it to print the main acronyms and then the others as sub-lists correctly:
\documentclass{article}
\usepackage{hyperref}
\usepackage[style=long, nonumberlist, nogroupskip]{glossaries}
\makenoidxglossaries
% The main title "List of Abbreviations with some acronyms should be printed first, followed by the subsections "Time" and "Cities"
%\setglossarysection{section}
\newglossary[alg1,nonumberlist, type=\acronymtype, section=subsection]{time}{acn1}{acr1}{Time}
\newglossary[alg2,nonumberlist,type=\acronymtype, section=subsection]{cities}{acn2}{acr2}{Cities}
% This entry is part of the main glossary
\newglossaryentry{orange}{name=orange, description={an orange coloured fruit},first={Orange}}
\newglossaryentry{utc}{type=time, name=\textsf{UTC}, description={Coordinated Universal Time},first={Coordinated Universal Time (UTC)}}
\newglossaryentry{la}{type=cities, name=\textrm{LA}, description={Los Angeles},first={Los Angeles (LA)}}
%: ----------------------- list of figures/tables/acronyms ------------------------
\begin{document}
\frontmatter
% TABLE OF CONTENTS
\listoffigures % print list of figures
\listoftables % print list of tables
\glsaddall
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{List of Abbreviations}
\printglossary[title=List of Abbreviations, toctitle=List of Abbreviations]
\printnoidxglossary[type=time]
\printnoidxglossary[type=cities]
\mainmatter
\chapter{Introduction}
% Use the acronyms
\gls{orange} is a main acronym, while \gls{utc} is part of a sub-list of acronyms called Time and \gls{la} is part of another sub-list of acronyms called Cities.
\end{document}