[Tex/LaTex] List of Abbreviations/Acronyms in Latex. Several issues


I want a list of abbreviations in my thesis. My thesis consist of multiple parts, which are included into the final document with the "include" command. The distinct parts of the thesis introduce sometimes the same abbreviations.
However, i do not want to maintain abbreviations on the level of the whole thesis, but on the level of the included parts.

Two packages are commonly used for abbreviations: nomencl and glossaries.
Both have issues.

I cannot have duplicate abbreviations, thus i have to maintain them at the thesis' level, which is complicated and distracting. I want the distinct parts to be as independent as possible.

Glossaries does not work good with natbib, e.g. \gls{SOM}\citep{Kohonen2001} results in (SOM) (Kohonen, 2001), what is considered bad style. It would be nicer, if it would produce (SOM; Kohonen, 2001).
So, my idea is to use the glossaries-package in a similar manner to nomencl. Only defining acronyms for the list of abbreviations, but not using \gls, glspl, etc. in the text.
However, to print the acronyms in the list, they must explicitly added with /glsaddall, but this command does not work for acronyms defined in included documents. I consider this a bug.

So, the best i think would be to stick with nomencl and somehow force it to ignore redefinitions of acronyms in the included documents.
Is this possible?

Alternatively, what approach would you suggest for my usecase (need abbrev list, multiple included documents)?

Best Answer

It's not clear if you want the citation every time you use the acronym, or just specific instances. It's also not clear what you want to happen if you try to redefine an existing acronym. Assuming specific instances of a citation and a reset when you attempt to define an existing acronym, you could achieve this as follows. First the main tex file:







  #1 \ifstrempty{#4}{(#3)}{\citep[#3;][]{#4}}%

  #1\ifstrempty{#4}{}{ \citep{#4}}%

\title{Sample Thesis}
\author{A.N. Other}






Now the first chapter (sample1.tex):

\chapter{First Sample Chapter}

\provideacronym{abc}{ABC}{Sample Acronym 1}%
\provideacronym{xyz}{XYZ}{Sample Acronym 2}%
\provideglossaryentry{sample}{name=sample,description=An example}%

An acronym: \gls{abc}. A \gls{sample}.
Sample acronym with a citation 
Another instance with a citation

And the second chapter (sample2.tex):

\chapter{Second Sample Chapter}

\provideacronym{abc}{ABC}{Sample Acronym 1}%
\provideglossaryentry{sample2}{name=another sample,description=Another example}%

An acronym: \gls{abc}. \Gls{sample2}.
Sample acronym with a citation 
Another instance with a citation
Related Question