I am using the glossaries package for acronyms. When first using an acronym using \gls{}, the entry is written as long form and the short form follows in parentheses. Sometimes, these are followed by parentheses already occuring in the sentence. Is there a way to merge the parentheses created by glossaries and the following one in the sentence? (For the acro package, this was apparently solved here.)
\documentclass[12pt]{article}
\usepackage{glossaries}
\newacronym{SX}{SX}{Stack Exchange}
\makeglossaries
\begin{document}
Hello \gls{SX} (tex.stackexchange.com)!
\end{document}
Actual result: Hello Stack Exchange (SX) (tex.stackexchange.com)!
Desired result: Hello Stack Exchange (SX, tex.stackexchange.com)!
The goal is to eliminate back-to-back parentheses caused by glossaries.
\gls{SX}? 2) You wrote "sometimes" ... So what are the use cases all together? Can you please expand your desired result(s) with all variations in mind? Thank you – MS-SPO Oct 05 '23 at 08:54