I have a document consisting of multiple tex files, one per chapter, I am using the glossaries package to create list of acronyms. Ideally I want to define acronyms as close to where they are used, i.e. in the chapter tex files, in order to make the chapters self contained. However, this leads to some double definitions (acronyms defined in multiple chapters), something which the glossaries package does not like (it throws a "Glossary entry `xx' has already been defined" error).

Therefore I was wondering if it would be possible to change the \newacronym command in a way that it would ignore attempts at defining acronyms that are already known.

Basically it would boil down to an if-then-else structure which first checks whether the acronym label is already known, if so does nothing and if not executes the original \newacronym code.

1 Answer 1


You could use glossaries' \ifglsentryexists macro to define a \provideacronym macro which will only define an acronym if not already defined. Additionally (as in my MWE) you could redefine \newacronym as \provideacronym.






\newacronym{cd}{CD}{compact disk}

\newacronym{cd}{CD 2}{compact disk 2}


Some text about \gls{cd}.


enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .