Skip to content

Multiple glossaries possible? #139

@t-charlotte

Description

@t-charlotte

Hello

I was wondering whether it is possible to use multiple glossaries, instead of a nomenclature and a glossary? The reason I would like to do so, is because the glossaries package provides referencing from text to the entry in the List of Abbreviations while the nomenclature package does not. I have done this before in other projects where it worked fine, but in this thesis template I cannot get it to work properly.

For the List of Abbreviations, I use an acronym-type glossary:

In the preamble:

\input{acronyms.tex}
\newcommand{\glossname}{List of Abbreviations}
\newcommand{\myprintacronyms}{%
\renewcommand{\glossaryname}{\glossname}
\cleardoublepage%
\printglossary[title=\glossname,type=\acronymtype]
\chaptermark{\glossname}
\addcontentsline{toc}{chapter}{\glossname} %% comment to exclude from TOC
}

replacing \myprintabbreviations by \myprintacronyms in the body of the document. The entries are defined in acronyms.tex in the following format:
\newacronym{DEA}{DEA}{dissociative electron attachment}

For the List of Symbols, I use a regular glossary:

In the preamble:

\newcommand{\glosssname}{List of Symbols}
\input{symbols.tex}
\newcommand{\myprintsymbols}{%
\renewcommand{\glossaryname}{\glosssname}
\cleardoublepage%
\printglossary[title=\glosssname]
\chaptermark{\glosssname}
\addcontentsline{toc}{chapter}{\glosssname} %% comment to exclude from TOC
}

replacing \myprintnomenclature by \myprintsymbols. The entries are defined in symbols.tex according to
\newglossaryentry{electronmass}{name={\ensuremath{m_e}},description={mass of an electron}} % add extra key type={symbols} when multiple glossaries

These work fine when used independently:

Image

When I combine them, both glossaries are printed successfully but all entries appear twice, once in each glossary. In order to sort them according to glossary, I tried \usepackage[acronym,symbols,nomain]{glossaries} but this makes the lay-out completely change and no glossary entries are printed at all:

Image

The same happened when I tried to define the two glossaries separately using

\newglossary[alg]{acronym}{acr}{acn}{List of Abbreviations}
\newglossary[alg]{symbol}{acr}{acn}{List of Symbols}

Would you happen to know a solution for this?

Best regards

Charlotte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions